Skip to Content
Menú
This question has been flagged
1 Respondre
4071 Vistes

Hello Dears,.


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

Avatar
Descartar
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
Descartar
Related Posts Respostes Vistes Activitat
2
de març 24
1762
5
de maig 20
3780
1
de març 15
4954
1
de març 15
4062
2
de jul. 25
1346