From a93bd0fb68ddd207cbf218ac20c029c17bd54a7e Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Wed, 9 Dec 2015 16:55:42 +0100 Subject: [PATCH] [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. --- addons/website_sale/models/product.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/website_sale/models/product.py b/addons/website_sale/models/product.py index e88a02c61fd..201e4f48dd4 100644 --- a/addons/website_sale/models/product.py +++ b/addons/website_sale/models/product.py @@ -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'),