summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindoteknik_custom/models/purchase_pricelist.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/indoteknik_custom/models/purchase_pricelist.py b/indoteknik_custom/models/purchase_pricelist.py
index d61fe70e..b189b464 100755
--- a/indoteknik_custom/models/purchase_pricelist.py
+++ b/indoteknik_custom/models/purchase_pricelist.py
@@ -89,6 +89,10 @@ class PurchasePricelist(models.Model):
product_group = rec.product_id.product_tmpl_id.x_manufacture.pricing_group or None
price_incl = rec.include_price
+ if not product_group:
+ self.env.cr.commit()
+ raise ValidationError(_('Produk %s tidak memiliki "Pricing Group"' % rec.product_id.display_name))
+
markup_percentage = price_group['markup'][product_group]
if markup_percentage == 0: continue