Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
4136 Vues

Hello Dears,.


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

Avatar
Ignorer
Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
2
mars 24
2074
5
mai 20
3847
1
mars 15
4991
1
mars 15
4093
2
juil. 25
1410