diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-09-28 11:14:28 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-09-28 11:14:28 +0700 |
| commit | 7e27706cca01443b8476afeaa856fa2cc3c12deb (patch) | |
| tree | 796ba2c9207ac378f75ef49df16cf44f4f222362 /indoteknik_custom/models/purchase_order.py | |
| parent | d023b4f2564c7d2fbe3d61a2348250569f182dc4 (diff) | |
change approval sales to vita and po to akbar and tyas
Diffstat (limited to 'indoteknik_custom/models/purchase_order.py')
| -rwxr-xr-x | indoteknik_custom/models/purchase_order.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py index cffeff69..ca106a68 100755 --- a/indoteknik_custom/models/purchase_order.py +++ b/indoteknik_custom/models/purchase_order.py @@ -91,9 +91,10 @@ class PurchaseOrder(models.Model): real_tax = tax real_tax_amount += tax.amount if (sale_order_line.purchase_tax_id.amount != real_tax_amount or count_real_tax > 1 \ - or real_tax.price_include != sale_order_line.purchase_tax_id.price_include) and (self.env.user.id != 6): + or real_tax.price_include != sale_order_line.purchase_tax_id.price_include) \ + and (self.env.user.id != 6 and self.env.user.id != 7): raise UserError("Beda tax amount dengan Sales, harus Approval Manager") - elif est_purchase_price < real_purchase_price and self.env.user.id != 6: + elif est_purchase_price < real_purchase_price and self.env.user.id != 6 and self.env.user.id != 7: raise UserError("Beda Price dengan Sales, harus Approval Manager") # elif line.product_id.type == 'service' and self.env.user_id != 6: # raise UserError("Ada tambahan Ongkos kirim, harus Approval Manager") @@ -121,11 +122,12 @@ class PurchaseOrder(models.Model): real_tax = tax real_tax_amount += tax.amount if (sale_order_line.purchase_tax_id.amount != real_tax_amount or count_real_tax > 1 \ - or real_tax.price_include != sale_order_line.purchase_tax_id.price_include) and self.env.user.id != 6: + or real_tax.price_include != sale_order_line.purchase_tax_id.price_include) \ + and (self.env.user.id != 6 and self.env.user.id != 7): approval += 1 - elif est_purchase_price != real_purchase_price and self.env.user.id != 6: + elif est_purchase_price != real_purchase_price and self.env.user.id != 6 and self.env.user.id != 7: approval += 1 - elif line.product_id.type == 'service' and self.env.user.id != 6: + elif line.product_id.type == 'service' and self.env.user.id != 6 and self.env.user.id != 7: approval += 1 if approval > 0: self.approval_status = "pengajuan1" |
