Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
6113 Widoki

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


Awatar
Odrzuć
Najlepsza odpowiedź

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


Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
wrz 19
7
0
kwi 18
3414
0
lip 20
7233
1
mar 25
920
0
maj 17
5624