summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2026-03-14 03:28:39 +0000
committerIT Fixcomart <it@fixcomart.co.id>2026-03-14 03:28:39 +0000
commit24888eca20489e07aa73206f1bc5e239b0252de1 (patch)
treeeb67f45f9689d49506670f20df15def80b7e2193
parent3198d05a30832c94b20986f8ff9ca479efa57cc1 (diff)
parentb25df7e1279192ffff31b933dcb3c219b05d7f85 (diff)
Merged in CR/Sourcing-Job (pull request #509)
<hafid> fix error purchase price
-rwxr-xr-xindoteknik_custom/models/purchase_pricelist.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/indoteknik_custom/models/purchase_pricelist.py b/indoteknik_custom/models/purchase_pricelist.py
index 83e06f55..1caa6dc2 100755
--- a/indoteknik_custom/models/purchase_pricelist.py
+++ b/indoteknik_custom/models/purchase_pricelist.py
@@ -74,6 +74,9 @@ class PurchasePricelist(models.Model):
@api.constrains('vendor_id', 'product_id')
def _check_duplicate_purchase_pricelist(self):
for price in self:
+ if not price.product_id or not price.vendor_id:
+ continue
+
domain = [
('product_id', '=', price.product_id.id),
('vendor_id', '=', price.vendor_id.id)