Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
4167 มุมมอง

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
3656
1
ก.ค. 22
2543
Javascript warning message แก้ไขแล้ว
1
มี.ค. 21
7432
How can I make a Popup Warning Message แก้ไขแล้ว
6
ก.ย. 23
107127
0
มิ.ย. 21
6362