diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2025-05-27 09:54:41 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2025-05-27 09:54:41 +0700 |
| commit | 121f5f732fc837e1f8b801eaaed038962aa574fd (patch) | |
| tree | 585d90a7d462afcb6d8d6e493a0ce64039391895 | |
| parent | d3f530b94569059106164172485aaa9665e80709 (diff) | |
notif diffrent vendor so and po
| -rwxr-xr-x | indoteknik_custom/models/purchase_order.py | 6 |
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 |
