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

I have this code but it 'isnt working 


if self.partner_id.credit_limit != 0.00 and self.is_checked == True:
if self.amount_total > available_credit:
self.write({'state_block':2})
msg = 'La commande ne peut pas être confirmée, le client a atteint sa limite de crédit.\
La commande ne peut être confirmée que suite à un payment ou dérogation par le responsable commerciale,\
Merci d"informer le responsable commerciale'
raise Warning(_(msg))
return False
else:
return True
Аватар
Отменить
Лучший ответ

Hi,

You can see the same example on sale order line, if you select the product it will show one warning message if stock is not available, as well as data will update.

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

Hi,  

 I think we cant use update and warning at the same time.warning restrict  the update of that particular record .

Аватар
Отменить
Related Posts Ответы Просмотры Активность
0
апр. 18
3524
1
июл. 22
2373
1
мар. 21
7324
6
сент. 23
106598
0
июн. 21
6241