Skip to Content
Menú
This question has been flagged
1 Respondre
6091 Vistes

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')


Avatar
Descartar
Best Answer

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')


Avatar
Descartar
Related Posts Respostes Vistes Activitat
0
de set. 19
7
0
d’abr. 18
3401
0
de jul. 20
7186
1
de març 25
888
0
de maig 17
5602