跳至內容
選單
此問題已被標幟
1 回覆
2898 瀏覽次數

classres_user(models.Model): 

 _inherit = ['res.partner']    

  zone = fields.Selection([('N', 'Norte'), ('C', 'Centro'), ('S', 'Sur')], string='Zona comercial')

My question is because when I try to add a new field to contacts from my module visit the server me error 500?

頭像
捨棄
最佳答案


The below _inherit uses if you want to add feature to your model for example messaging or mailing

_inherit = ['model_name']


If you want to add field to model use:

_inherit = 'res.partner'

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
7月 25
875
1
9月 24
1474
2
10月 23
5599
0
10月 23
1728
3
9月 23
2444