Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
1453 Переглядів

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?

Аватар
Відмінити
Найкраща відповідь

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​')`.

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
3
трав. 24
2227
2
квіт. 24
2006
0
квіт. 24
933
2
лист. 21
2333
0
вер. 24
1251