Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
1482 Visualizzazioni

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?

Avatar
Abbandona
Risposta migliore

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

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
3
mag 24
2253
2
apr 24
2064
0
apr 24
933
2
nov 21
2373
0
set 24
1289