跳至内容
菜单
此问题已终结
1 回复
4094 查看

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
1787
5
5月 20
3784
1
3月 15
4962
1
3月 15
4067
2
7月 25
1351