Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
6128 Vizualizări

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


Imagine profil
Abandonează
Cel mai bun răspuns

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


Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
0
sept. 19
7
0
apr. 18
3416
0
iul. 20
7242
1
mar. 25
925
0
mai 17
5626