diff options
Diffstat (limited to 'indoteknik_api/models')
| -rw-r--r-- | indoteknik_api/models/product_product.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/indoteknik_api/models/product_product.py b/indoteknik_api/models/product_product.py index 03742d69..334b58c5 100644 --- a/indoteknik_api/models/product_product.py +++ b/indoteknik_api/models/product_product.py @@ -48,6 +48,11 @@ class ProductProduct(models.Model): } return data + def has_active_program(self): + program_line = self.env['promotion.program.line'] + product_promotions = program_line.get_active_promotions(self.id) + return True if len(product_promotions) > 0 else False + def calculate_website_price(self): pricelist = self.env.user_pricelist |
