Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
4 ตอบกลับ
8266 มุมมอง

 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?

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มี.ค. 25
862
2
ธ.ค. 22
5635
1
มี.ค. 15
4693
1
มี.ค. 15
6400
1
เม.ย. 25
2655