Browse Source

[ADD] Add image copy pack

12.0
Juliana 4 years ago
parent
commit
d62629ba0f
  1. 4
      models/product_template.py

4
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)]
Loading…
Cancel
Save