summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMqdd <ahmadmiqdad27@gmail.com>2026-02-10 17:11:55 +0700
committerMqdd <ahmadmiqdad27@gmail.com>2026-02-10 17:11:55 +0700
commita27ad769a3f8de5ed4593cff98224b710de7c8a1 (patch)
tree6eb883a88351804530eff8f66b8a51af753391c7
parenta951e16565c11c137d06672ab8750cb3a246dd41 (diff)
<Miqdad> fix code
-rw-r--r--fixco_custom/models/stock_inventory.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/fixco_custom/models/stock_inventory.py b/fixco_custom/models/stock_inventory.py
index 529aa66..1a8f3b0 100644
--- a/fixco_custom/models/stock_inventory.py
+++ b/fixco_custom/models/stock_inventory.py
@@ -81,14 +81,14 @@ class StockInventory(models.Model):
def action_approve(self):
if self.adjusment_type == 'out':
for rec in self:
- if self.approval_state == 'logistic':
+ if rec.approval_state == 'logistic':
if not rec.env.user.id in [10, 14, 20, 21]:
raise UserError("Harus diapprove logistic")
- self.approval_state = 'accounting'
- elif self.approval_state == 'accounting':
+ rec.approval_state = 'accounting'
+ elif rec.approval_state == 'accounting':
if not rec.env.user.id in [13, 24, 2]:
raise UserError("Harus diapprove accounting")
- self.approval_state = 'approved'
+ rec.approval_state = 'approved'
else:
raise UserError("Sudah Approved")