Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
4114 Представления

Hello Dears,.


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

Аватар
Отменить
Лучший ответ

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

Аватар
Отменить
Related Posts Ответы Просмотры Активность
Sales quotation Решено
2
мар. 24
1898
5
мая 20
3806
1
мар. 15
4978
1
мар. 15
4085
2
июл. 25
1388