Skip to Content
Menu
This question has been flagged
2 Replies
2199 Rodiniai

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


Portretas
Atmesti
Best Answer

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

Portretas
Atmesti
Best Answer


There is opportunity_id field.

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
0
rugs. 24
1382
0
geg. 24
26
1
bal. 24
4789
0
kov. 24
1694
0
kov. 24
1713