Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
6097 Visualizações

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
Cancelar
Melhor resposta

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
0
set. 19
7
0
abr. 18
3402
0
jul. 20
7190
1
mar. 25
888
0
mai. 17
5604