summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/promotion_program_line.py
diff options
context:
space:
mode:
Diffstat (limited to 'indoteknik_custom/models/promotion_program_line.py')
-rw-r--r--indoteknik_custom/models/promotion_program_line.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/indoteknik_custom/models/promotion_program_line.py b/indoteknik_custom/models/promotion_program_line.py
index c888f01a..55331aea 100644
--- a/indoteknik_custom/models/promotion_program_line.py
+++ b/indoteknik_custom/models/promotion_program_line.py
@@ -126,9 +126,9 @@ class PromotionProgramLine(models.Model):
'label': dict(self._fields['promotion_type'].selection).get(self.promotion_type)
}
- def format(self, user = None, pricelist = False):
+ def format(self, user = None):
ir_attachment = self.env['ir.attachment']
- product_price = self.product_id.calculate_website_price(pricelist=pricelist)
+ product_price = self.product_id.calculate_website_price()
return {
'id': self.id,
'name': self.name,
@@ -142,7 +142,11 @@ class PromotionProgramLine(models.Model):
'price': self.calculate_price(price=product_price)
}
- def res_format(self, user, pricelist):
- data = [x.format(user, pricelist=pricelist) for x in self]
+ def res_format(self, user):
+ data = [x.format(user) for x in self]
+ return data
+
+ def res_format_cart(self, user):
+ data = self.format(user)
return data