Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
2 Vastaukset
2253 Näkymät

Hi,

I want to use an automated action which changes the state of my CRM opportunity automatically to a 'won' status when I validate the (sales)quotation which is related to the opportunity. can someone give me some advice?

Thanks in advance for your answer

Thijs


Avatar
Hylkää
Paras vastaus

Hi,

For changing the state of CRM opportunity automatically to a 'won' status when validating the (sales)quotation, First Inherit the sale.order model. Then super the function action_confirm. 

def action_confirm(self):
              res = super(SalesOrderInherit, self).action_confirm()
              if self.opportunity_id:
                      self.opportunity_id.action_set_won_rainbowman()
             return res

Regards

Avatar
Hylkää
Paras vastaus


There is opportunity_id field.

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
0
syysk. 24
1436
0
toukok. 24
26
1
huhtik. 24
4871
0
maalisk. 24
1743
0
maalisk. 24
1749