diff options
Diffstat (limited to 'indoteknik_custom')
| -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) |
