Skip to Content
मेन्यू
This question has been flagged
1 Reply
4218 Views

Hello Dears,.


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

Avatar
Discard
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
Discard
Related Posts Replies Views Activity
2
मार्च 24
3491
5
मई 20
3914
1
मार्च 15
5107
1
मार्च 15
4242
2
जुल॰ 25
1502