Skip to Content
Menu
This question has been flagged
1 Atsakyti
4376 Rodiniai

Hello Dears,.


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

Portretas
Atmesti
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

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
2
kov. 24
7059
5
geg. 20
4149
1
kov. 15
5387
1
kov. 15
4492
2
liep. 25
1725