From d62629ba0fa6fb4f22fc0b84350a881942fad800 Mon Sep 17 00:00:00 2001 From: Juliana Date: Thu, 20 May 2021 15:18:36 +0200 Subject: [PATCH] [ADD] Add image copy pack --- models/product_template.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/models/product_template.py b/models/product_template.py index 9a7d31c..7bede03 100644 --- a/models/product_template.py +++ b/models/product_template.py @@ -55,6 +55,10 @@ class ProductTemplate(models.Model): pack.pack_type == 'detailed' and pack.pack_component_price == 'totalized'): product_parent_id = pack.pack_line_ids[0].product_id pack.description_sale = product_parent_id.description_sale + if product_parent_id.image: + pack.image = product_parent_id.image + pack.image_small = product_parent_id.image_small + pack.image_medium = product_parent_id.image_medium if product_parent_id.product_image_ids: pack.write({ 'product_image_ids': [(6, 0, product_parent_id.product_image_ids.ids)]