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

I'm using the Partner Affiliate module and have extended sale.order to include a many2one partner_affiliate_id field. Now, in the Sale Order Form, when creating a new Partner Affiliate, I need to include the partner_affiliate_id and partner_id (to be set as the affiliate's parent_id) in the vals that are passed to the res.partner create() method.


How can I add these fields to vals?

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

One method is that you can send the partner_affiliate_id​ in the context fromsale.order​ and get that value in create​ method of res.partner​ like `affiliate_partner_id = self._context.get('partner_affiliate_id​')`.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 5 24
2229
2
thg 4 24
2010
0
thg 4 24
933
2
thg 11 21
2351
0
thg 9 24
1254