summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indoteknik_custom/models/promotion/promotion_free_product.py4
-rw-r--r--indoteknik_custom/models/promotion/promotion_product.py4
2 files changed, 8 insertions, 0 deletions
diff --git a/indoteknik_custom/models/promotion/promotion_free_product.py b/indoteknik_custom/models/promotion/promotion_free_product.py
index c5055562..e91d5137 100644
--- a/indoteknik_custom/models/promotion/promotion_free_product.py
+++ b/indoteknik_custom/models/promotion/promotion_free_product.py
@@ -17,6 +17,10 @@ class PromotionFreeProduct(models.Model):
weight = rec.product_id.weight or 0
result.append({
'id': rec.product_id.id,
+ 'parent': {
+ 'id': rec.product_id.product_tmpl_id.id,
+ 'name': rec.product_id.product_tmpl_id.name,
+ },
'image': ir_attachment.api_image('product.template', 'image_256', rec.product_id.product_tmpl_id.id),
'display_name': rec.product_id.display_name,
'name': rec.product_id.name,
diff --git a/indoteknik_custom/models/promotion/promotion_product.py b/indoteknik_custom/models/promotion/promotion_product.py
index 2fad0f0d..ae26e888 100644
--- a/indoteknik_custom/models/promotion/promotion_product.py
+++ b/indoteknik_custom/models/promotion/promotion_product.py
@@ -17,6 +17,10 @@ class PromotionProduct(models.Model):
weight = rec.product_id.weight or 0
result.append({
'id': rec.product_id.id,
+ 'parent': {
+ 'id': rec.product_id.product_tmpl_id.id,
+ 'name': rec.product_id.product_tmpl_id.name,
+ },
'image': ir_attachment.api_image('product.template', 'image_256', rec.product_id.product_tmpl_id.id),
'display_name': rec.product_id.display_name,
'name': rec.product_id.name,