Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
6042 Vistas

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
Mejor respuesta

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
Publicaciones relacionadas Respuestas Vistas Actividad
0
sept 19
7
0
abr 18
3325
0
jul 20
7088
1
mar 25
787
0
may 17
5538