Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
4 Trả lời
8256 Lượt xem

 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. 

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Tác giả

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

Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 3 25
859
2
thg 12 22
5633
1
thg 3 15
4693
1
thg 3 15
6397
1
thg 4 25
2588