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

I have some field with string name Provider
In different cases i need to change Provider for another field name. How can i do it? What function i need to overwrite?
Thank's

res_pr = fields.Char(string='Provider')


形象
丢弃
最佳答案

Lets suppose you have model A defined as below:


from odoo import fields, models, api, _

class A(models.Model):
_name = 'A'
   field_name = fields.char(string='Provider')

So you will inherit the model and override the field as below:

from odoo import fields, models, api, _
class A(models.Model):
_inherit = "A"

   field_name = fields.char(string='New Name')


形象
丢弃
相关帖文 回复 查看 活动
0
9月 19
7
0
4月 18
3416
0
7月 20
7245
1
3月 25
933
0
5月 17
5627