summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models
diff options
context:
space:
mode:
Diffstat (limited to 'indoteknik_custom/models')
-rwxr-xr-xindoteknik_custom/models/purchase_order.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py
index b53f973f..2c9b72b1 100755
--- a/indoteknik_custom/models/purchase_order.py
+++ b/indoteknik_custom/models/purchase_order.py
@@ -108,7 +108,7 @@ class PurchaseOrder(models.Model):
(self.env.user.id != 6 and self.env.user.id != 7): # tyas or akbar
approval2 += 1
elif (line.item_percent_margin >= 15 and line.item_percent_margin < 25) and \
- (self.env.user.id != 6 and self.env.user.id != 7 and self.env.user.id != 11):
+ (self.env.user.id != 6 and self.env.user.id != 7 and self.env.user.id != 11): # tyas or akbar or darren
approval1 += 1
if approval2 > 0:
raise UserError("Need Tyas / Akbar Approval")
@@ -137,3 +137,8 @@ class PurchaseOrder(models.Model):
order.approval_status = 'pengajuan1'
else:
raise UserError("Bisa langsung Confirm")
+
+ def button_cancel(self):
+ res = super(PurchaseOrder, self).button_cancel()
+ self.approval_status = False
+ return res