odoo/addons/website_sale_options
Denis Ledoux 0cf87d1671 [FIX] website_sale_options: keep website language on cart addition
In the ecommerce, when adding a product to the cart
while having website_sale_options installed
the product was added in the cart within the
website default language, not in the current
language of the visitor. The description of the product
was in the default website language (for instance, English)
instead of being in the visitor language (for instance, French).

The reason is quite simple: With website_sale_options, routes
are called in javascript, and these calls do not include the
website language within the url to the route
(e.g., call to '/shop/modal' instead of '/fr_FR/shop/modal)
and the language in the request context is therefore
the website default language.

The solution proposed here is probably not the cleanest possible,
a cleaner solution would be to define a new utility
JS function within website javascript to perform
Ajax calls, automatically adding the language to the url path
according to the current visitor language.

Another solution would be to set the lang of the session context
to the visitor language, and to use this lang instead of the
lang within request.context.

Nevertheless, none of the two above solutions can be performed in
stable releases, such as 8.0, to avoid any risks.

opw-631400
2015-03-25 14:33:33 +01:00
..
controllers [FIX] website_sale_options: keep website language on cart addition 2015-03-25 14:33:33 +01:00
data
i18n [I18N] Update translations from Launchpad 8.0 branches 2015-02-18 11:51:07 +01:00
models [FIX] website_sale_option: make options work 2014-08-07 09:51:27 +02:00
static/src [FIX] website_sale_options: keep website language on cart addition 2015-03-25 14:33:33 +01:00
tests [FIX] website_sale_options: enable tour test 2014-07-02 10:43:07 +02:00
views [FIX] website_sale: the cart and modal in ecomerce are not responsive for phone 2015-02-16 16:33:01 +01:00
__init__.py
__openerp__.py [FIX] improving manifests 2014-08-30 13:18:33 +02:00