Skip to Content
Menu
This question has been flagged
1 Atsakyti
6134 Rodiniai

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


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


Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
0
rugs. 19
7
0
bal. 18
3416
0
liep. 20
7244
1
kov. 25
929
0
geg. 17
5627