Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
1 Svar
4173 Visninger

Hello Dears,.


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

Avatar
Kassér
Bedste svar

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
Kassér
Related Posts Besvarelser Visninger Aktivitet
2
mar. 24
2950
5
maj 20
3879
1
mar. 15
5036
1
mar. 15
4147
2
jul. 25
1471