Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
4070 Vistas

Hello Dears,.


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

Avatar
Descartar
Mejor respuesta

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
Publicaciones relacionadas Respuestas Vistas Actividad
2
mar 24
1753
5
may 20
3780
1
mar 15
4944
1
mar 15
4060
2
jul 25
1346