diff options
| author | HafidBuroiroh <hafidburoiroh09@gmail.com> | 2026-03-14 10:28:02 +0700 |
|---|---|---|
| committer | HafidBuroiroh <hafidburoiroh09@gmail.com> | 2026-03-14 10:28:02 +0700 |
| commit | b25df7e1279192ffff31b933dcb3c219b05d7f85 (patch) | |
| tree | eb67f45f9689d49506670f20df15def80b7e2193 /indoteknik_custom/models | |
| parent | d9e637e5b3b398a0e0d6cae6631bb65358b8feef (diff) | |
<hafid> fix error purchase price
Diffstat (limited to 'indoteknik_custom/models')
| -rwxr-xr-x | indoteknik_custom/models/purchase_pricelist.py | 3 |
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) |
