summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2025-05-27 09:54:41 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2025-05-27 09:54:41 +0700
commit121f5f732fc837e1f8b801eaaed038962aa574fd (patch)
tree585d90a7d462afcb6d8d6e493a0ce64039391895
parentd3f530b94569059106164172485aaa9665e80709 (diff)
notif diffrent vendor so and po
-rwxr-xr-xindoteknik_custom/models/purchase_order.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py
index cbfd4acd..36c4c7b9 100755
--- a/indoteknik_custom/models/purchase_order.py
+++ b/indoteknik_custom/models/purchase_order.py
@@ -817,7 +817,11 @@ class PurchaseOrder(models.Model):
if not line.so_line_id:
continue
if line.so_line_id.vendor_id.id != vendor_po and not self.env.user.has_group('indoteknik_custom.group_role_merchandiser'):
- raise UserError("Produk "+line.product_id.name+" memiliki vendor berbeda dengan SO (Vendor PO: "+str(self.partner_id.name)+", Vendor SO: "+str(line.so_line_id.vendor_id.name)+")")
+ self.env.user.notify_danger(
+ title='WARNING!!!',
+ message="Produk "+line.product_id.name+" memiliki vendor berbeda dengan SO (Vendor PO: "+str(self.partner_id.name)+", Vendor SO: "+str(line.so_line_id.vendor_id.name)+")",
+ sticky=True
+ )
def button_confirm(self):
# self._check_payment_term() # check payment term