跳至内容
菜单
此问题已终结
2 回复
4183 查看

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 .

形象
丢弃
相关帖文 回复 查看 活动
0
4月 18
3689
1
7月 22
2557
1
3月 21
7450
6
9月 23
107182
0
6月 21
6371