diff options
| -rwxr-xr-x | indoteknik_custom/models/purchase_order.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py index 9faa6464..d65e1d66 100755 --- a/indoteknik_custom/models/purchase_order.py +++ b/indoteknik_custom/models/purchase_order.py @@ -589,7 +589,10 @@ class PurchaseOrder(models.Model): for line in self.order_line: if not line.product_id: continue - if line.product_uom_qty > line.product_id.plafon_qty and not self.env.user.has_group('indoteknik_custom.group_role_merchandiser'): + # test = line.product_uom_qty + # test2 = line.product_id.plafon_qty + # test3 = test2 + line.product_uom_qty + if line.product_uom_qty > line.product_id.plafon_qty + line.product_uom_qty and not self.env.user.has_group('indoteknik_custom.group_role_merchandiser'): raise UserError('Product '+line.product_id.name+' melebihi plafon, harus Approval MD') def button_confirm(self): @@ -772,7 +775,6 @@ class PurchaseOrder(models.Model): + str(line.product_id.plafon_qty) + ') vs Qty PO ('+str(line.product_uom_qty)+')' + ', ') greater_than_plafon = True - print(1) return greater_than_plafon, message def re_calculate(self): |
