diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2025-01-07 16:02:47 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2025-01-07 16:02:47 +0700 |
| commit | 61c9291070da3ef7f81774290db1923789792210 (patch) | |
| tree | c010ebacb209dfb57fb5fe1d23e986c4b051cac1 /indoteknik_custom/models/purchase_order.py | |
| parent | c971e71a19426de6c210100e2e110319df81aafa (diff) | |
| parent | 1ec4b411c91851202a6058b531257f45fdd76457 (diff) | |
Merge branch 'production' into iman/pengajuan-tempo
Diffstat (limited to 'indoteknik_custom/models/purchase_order.py')
| -rwxr-xr-x | indoteknik_custom/models/purchase_order.py | 4 |
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") |
