From b25df7e1279192ffff31b933dcb3c219b05d7f85 Mon Sep 17 00:00:00 2001 From: HafidBuroiroh Date: Sat, 14 Mar 2026 10:28:02 +0700 Subject: fix error purchase price --- indoteknik_custom/models/purchase_pricelist.py | 3 +++ 1 file changed, 3 insertions(+) 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) -- cgit v1.2.3