Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
4 Replies
8088 Tampilan

 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. 

Avatar
Buang
Jawaban Terbai

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

Avatar
Buang
Penulis

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

Jawaban Terbai

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

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
1
Mar 25
812
2
Des 22
5556
1
Mar 15
4627
1
Mar 15
6316
1
Apr 25
2003