diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2024-11-12 13:35:24 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2024-11-12 13:35:24 +0700 |
| commit | 9f293c1270e29db78ac8542221a4bbe6d208ea8f (patch) | |
| tree | 2358cda8c91dc1c1e906566c2960f6610cd816a3 | |
| parent | 16cb40e0a943af1679fca60ff8cc4e6a683bd883 (diff) | |
bf plafon
| -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): |
