Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
4363 Prikazi

Hello Dears,.


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

Avatar
Opusti
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
Opusti
Related Posts Odgovori Prikazi Aktivnost
2
mar. 24
6955
5
maj 20
4143
1
mar. 15
5381
1
mar. 15
4483
2
jul. 25
1721