Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
6046 Vues

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
Ignorer
Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
0
sept. 19
7
0
avr. 18
3329
0
juil. 20
7110
1
mars 25
802
0
mai 17
5551