Browse Source

[FIX] Fix copy image bug pack

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

8
models/product_template.py

@ -56,9 +56,11 @@ class ProductTemplate(models.Model):
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
pack.write({
'image': product_parent_id.image,
'image_small': product_parent_id.image_small,
'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