跳至内容
菜单
此问题已终结
2 回复
7853 查看

I'm using OE7, and when I change a product name, it doesn't update the field 'name' at database in the table 'product_product'. The name of the product is translated, but I don't want this. How can I force updating name field instead to do a translation? Thanks in advice.

形象
丢弃
编写者 最佳答案

This can be solved changing the translate property at \addons\products\products.py:

class product_template(osv.osv): _name = "product.template" _description = "Product Template"

_columns = {
    'name': fields.char('Name', size=128, required=True, **translate=False**, select=True)

I have multi_variants module installed, and this trick don't works if this module is installed.

形象
丢弃
编写者 最佳答案

Solved changing translate=False at \addons\product\product.py Now changes are updated in product_template,name

#----------------------------------------------------------

Products

#---------------------------------------------------------- class product_template(osv.osv): _name = "product.template" _description = "Product Template"

_columns = {
    'name': fields.char('Name', size=128, required=True,  translate=False, select=True)
形象
丢弃
相关帖文 回复 查看 活动
1
10月 23
1884
0
3月 15
4080
1
12月 24
1380
3
12月 23
20072
1
3月 15
5838