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

The project name field can be translated, which doesn't make sense and is a pain to manage...

I tried to turn off by overriding the property through a custom module and that works, but all the project names are now json objects and doesn't seem possible to save them back as text.

How could I do this?


形象
丢弃
最佳答案

try this way:

#inherit the model

from odoo import fields, models 
​classMyModel(models.Model): 
​​_inherit = 'base.model'# Replace 'base.model' with the actual model you want to inherit

​field_name = fields.Char(string='Field Name', translate=False)

形象
丢弃
编写者

Hi, thanks for the feedback!
That's what I did; but the field already has many entries with values that are not the same between the languages; Odoo isn't t "dropping" one of them, it's showing both in json format in some views; other views just show "[object object]" and the data can't be updated due to some sql error trying to update a json column...

相关帖文 回复 查看 活动
1
5月 22
3208
3
7月 25
2022
3
5月 25
3520
2
6月 25
4071
0
3月 22
105