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

 I Have a two custom module one of them inherit field in res.partner module I want to show that field value to my other custom module For example name field value want to show in my other custom module. 

頭像
捨棄
最佳答案

Hi, 

In your new model you can add a many2one field to the res.partner model and achieve it. 

partner_id = fields.Many2one('res.partner', string="Customer")

Thanks

頭像
捨棄
作者

class ResPartner(models.Model):

_name = "res.partner"

partner_id = fields.Many2one('res.partner', string="Customer")

Like that and .xml file code:

<field name="partner_id" /> is that correct.?

_name = "res.partner" , specify your model name here, instead of res.partner

最佳答案

What should i do if i want to add the name and address field only?

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
3月 25
833
2
12月 22
5581
1
3月 15
4657
1
3月 15
6337
1
4月 25
2110