Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
7876 Lượt xem

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.

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

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.

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

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)
Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 10 23
1901
0
thg 3 15
4093
1
thg 12 24
1387
3
thg 12 23
20106
1
thg 3 15
5876