Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
4083 Zobrazení

Hello Dears,.


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

Avatar
Zrušit
Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
bře 24
1772
5
kvě 20
3782
1
bře 15
4959
1
bře 15
4064
2
čvc 25
1351