[FIX] website_sale: active text translation for product description

If translate=True AND if sanitize=True (By default sanitize=True) the html field use automatically html_translate method.
This commit is contained in:
Christophe Matthieu
2015-12-10 09:10:29 +01:00
parent e86372c504
commit a93bd0fb68
+2 -1
View File
@@ -4,6 +4,7 @@
import openerp
from openerp import tools
from openerp.osv import osv, fields
from openerp.tools.translate import html_translate
class product_style(osv.Model):
_name = "product.style"
@@ -105,7 +106,7 @@ class product_template(osv.Model):
],
string='Website Comments',
),
'website_description': fields.html('Description for the website', sanitize=False, translate=True),
'website_description': fields.html('Description for the website', sanitize=False, translate=html_translate),
'alternative_product_ids': fields.many2many('product.template','product_alternative_rel','src_id','dest_id', string='Suggested Products', help='Appear on the product page'),
'accessory_product_ids': fields.many2many('product.product','product_accessory_rel','src_id','dest_id', string='Accessory Products', help='Appear on the shopping cart'),
'website_size_x': fields.integer('Size X'),