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

Hello Dears,.


I want when quotation status be Cancel the Customer i select in the quotation will be deactivate automatically 

頭像
捨棄
最佳答案

Hi,

You can make the customer inactive by super the function of the cancel button.

class SaleOrderInherit(models.Model):
_inherit = 'sale.order'

@api.multi
def action_cancel(self, vals):
self.partner_id.active = False
res = super(SaleOrderInherit, self).action_cancel()
return res


Thanks

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
2
3月 24
2074
5
5月 20
3847
1
3月 15
4991
1
3月 15
4093
2
7月 25
1410