summaryrefslogtreecommitdiff
path: root/indoteknik_api/models
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2023-07-18 16:38:29 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2023-07-18 16:38:29 +0700
commitd966917a5ba95074b6773f49fcb2c3c924296029 (patch)
tree1522069c54c85dad7ec01ae9c16000034cde8878 /indoteknik_api/models
parente0102841e6e21c7b583f096914aa4ba1a28e1587 (diff)
Fix lost merge voucher with promotion program
Diffstat (limited to 'indoteknik_api/models')
-rw-r--r--indoteknik_api/models/product_product.py5
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