Closed simahawk closed 7 years ago
Well, it's supposed that if you have an image, automatically gets the first image also on multi-images, so this is the part we have to check. Why don't you have this first image? Maybe some piece of code that makes it?
hmm, I don't get this :)
It's pretty easy to replicate:
So, are we expecting to not be able to add images to variants IF the template has no image? If yes, we should make variant field readonly, otherwise we need to fix that method to write on image_ids only if there's something there or to add a new image if none.
Uhm, let me check then. The initial idea is:
In this logic, that was made for v8, I don't know if something has changed in the port to v9.
That makes sense, the problem is that it's broken because it tries to write on product.image_ids[0]
only because image
is valued. Adding a new image is not taken into account at all.
@pedrobaeza this is what I mean ;) https://github.com/OCA/product-attribute/pull/229/files
@simahawk - Can this be closed now?
yup!
Context:
Issue: If you add an image to a variant:
We miss a safe check here https://github.com/OCA/product-attribute/blob/9.0/product_multi_image/models/product_product.py#L28