コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
6051 ビュー

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


アバター
破棄
最善の回答

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


アバター
破棄
関連投稿 返信 ビュー 活動
0
9月 19
7
0
4月 18
3331
0
7月 20
7128
1
3月 25
824
0
5月 17
5564