Skip to Content
Menu
This question has been flagged
1 Odpoveď
4118 Zobrazenia

Hello Dears,.


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

Avatar
Zrušiť
Best Answer

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

Avatar
Zrušiť
Related Posts Replies Zobrazenia Aktivita
2
mar 24
1981
5
máj 20
3815
1
mar 15
4982
1
mar 15
4087
2
júl 25
1394