Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
2248 Weergaven

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
Annuleer
Beste antwoord

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
Annuleer
Beste antwoord


There is opportunity_id field.

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
0
sep. 24
1427
0
mei 24
26
1
apr. 24
4863
0
mrt. 24
1735
0
mrt. 24
1742