summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2024-11-26 16:06:50 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2024-11-26 16:06:50 +0700
commit58bec36c52b223c12fd15511a56ab417ebbd7257 (patch)
tree031ffa6736cf0662e5aff2f1616b4c643c8674b2
parentf01c853cec6302fcfce62bab278d1bda57f1f131 (diff)
fix bug po
-rwxr-xr-xindoteknik_custom/models/purchase_order.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py
index 26dc5102..9388ae4c 100755
--- a/indoteknik_custom/models/purchase_order.py
+++ b/indoteknik_custom/models/purchase_order.py
@@ -600,7 +600,7 @@ class PurchaseOrder(models.Model):
for line in self.order_line:
if not line.so_line_id:
continue
- if line.so_line_id.vendor_id.id != vendor_po:
+ 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)+")")
def button_confirm(self):