Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
2227 Widoki

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


Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Najlepsza odpowiedź


There is opportunity_id field.

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
wrz 24
1398
0
maj 24
26
1
kwi 24
4813
0
mar 24
1698
0
mar 24
1724