summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2024-10-16 14:56:12 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2024-10-16 14:56:12 +0700
commite60bfff5a9ec49545370b1804b33535b5f373b60 (patch)
tree09f3b3d59882492e618d578443989f7c66d7273a
parentcee154a43c181b4ba1feda600028dffe198fb48b (diff)
cr approval unreserve
-rw-r--r--indoteknik_custom/models/approval_unreserve.py2
-rwxr-xr-xindoteknik_custom/models/purchase_order.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/indoteknik_custom/models/approval_unreserve.py b/indoteknik_custom/models/approval_unreserve.py
index 85dfffff..07ddda1f 100644
--- a/indoteknik_custom/models/approval_unreserve.py
+++ b/indoteknik_custom/models/approval_unreserve.py
@@ -68,7 +68,7 @@ class ApprovalUnreserve(models.Model):
if not move:
raise UserError("Product tidak ada di destination picking")
- qty_unreserve = line.unreserve_qty + move.forecast_availability
+ qty_unreserve = line.unreserve_qty + move.reserved_availability
if move.product_uom_qty < qty_unreserve:
raise UserError("Quantity yang di unreserve melebihi quantity yang ada")
diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py
index 21f3265e..f8af409f 100755
--- a/indoteknik_custom/models/purchase_order.py
+++ b/indoteknik_custom/models/purchase_order.py
@@ -509,10 +509,10 @@ class PurchaseOrder(models.Model):
raise UserError("Hanya Merchandiser yang bisa approve")
if self.total_percent_margin < self.total_so_percent_margin and not self.env.user.has_group('indoteknik_custom.group_role_merchandiser') and not self.env.user.is_leader:
- raise UserError("Beda Margin dengan Sales, harus approval Manager")
+ raise UserError("Beda Margin dengan Sales, harus approval Merchandise")
if not self.from_apo:
if not self.sale_order_id and self.env.user.has_group('indoteknik_custom.group_role_merchandiser') and not self.env.user.is_leader:
- raise UserError("Tidak ada link dengan SO, harus approval Manager")
+ raise UserError("Tidak ada link dengan SO, harus approval Merchandise")
send_email = False
self.add_product_to_pricelist()