跳至內容
選單
此問題已被標幟
2 回覆
2200 瀏覽次數

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


頭像
捨棄
最佳答案

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

頭像
捨棄
最佳答案


There is opportunity_id field.

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
0
9月 24
1387
0
5月 24
26
1
4月 24
4797
0
3月 24
1695
0
3月 24
1717