summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/purchase_order.py
diff options
context:
space:
mode:
Diffstat (limited to 'indoteknik_custom/models/purchase_order.py')
-rwxr-xr-xindoteknik_custom/models/purchase_order.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py
index 9388ae4c..0e39d12a 100755
--- a/indoteknik_custom/models/purchase_order.py
+++ b/indoteknik_custom/models/purchase_order.py
@@ -74,6 +74,7 @@ class PurchaseOrder(models.Model):
approve_by = fields.Many2one('res.users', string='Approve By')
exclude_incoming = fields.Boolean(string='Exclude Incoming', default=False,
help='Centang jika tidak mau masuk perhitungan Incoming Qty')
+ not_update_purchasepricelist = fields.Boolean(string='Not Update Purchase Pricelist?')
def _compute_total_margin_match(self):
for purchase in self:
@@ -620,7 +621,8 @@ class PurchaseOrder(models.Model):
raise UserError("Tidak ada link dengan SO, harus approval Merchandise")
send_email = False
- self.add_product_to_pricelist()
+ if not self.not_update_purchasepricelist:
+ self.add_product_to_pricelist()
for line in self.order_line:
if not line.product_id.purchase_ok:
raise UserError("Terdapat barang yang tidak bisa diproses")