summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/purchase_order.py
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-12-31 09:44:11 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-12-31 09:44:11 +0700
commit8d00df73e76162d624d2f32eefdd47ca68ca154c (patch)
treeef2b9706de3bbe895709502bf60506bca8f20a91 /indoteknik_custom/models/purchase_order.py
parent6a7b2e28c9c1612ac3e91ac321b72e3400fdb5a3 (diff)
parentd35c2dce88a87bc05d30c4935d51d7d58aa5d37d (diff)
Merge branch 'production' into iman/telegram
# Conflicts: # indoteknik_custom/models/stock_picking.py
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")