[IMP] product_multi_image: Handle images in variants#151
Conversation
d93060d to
be93a7c
Compare
|
This one is ready to be reviewed. |
be93a7c to
5bd61f7
Compare
|
The error in Travis is unrelated (due to product_pricelist_fixed_price). |
|
👍 |
|
👍 Tested and ok. |
product_multi_image/models/image.py
Outdated
| comodel_name="product.product", string="Visible in these variants", | ||
| help="If you leave it empty, all variants will show this image. " | ||
| "Selecting one or several of the available variants, you " | ||
| "restrict the availability of the image to that variants.") |
|
Tested in runbot, I have an issue.
Besides, runbot page displays some errors that seem related: Code seems good except for some little remarks. |
|
I'll check your use case. Probably there will be an assignation image=False in the variant creation. We should inhibit the inverse function in that case. For the error in the log, it seems a bug in the ORM that I have already seen commented by others (I think @hbrunn), so for now I don't think it's important, because it doesn't prevent the normal behaviour, although it's a bit ugly. |
|
In such case an entry to known issues would be enough. |
|
@yajo, I have fixed the user case that was incorrect, and include 2 new tests for testing this case. Please review before you leave tomorrow. |
650f187 to
d8a5b14
Compare
|
I have this problem now (I don't know if it is expected, but for what I read in the README seems like it's a bug):
|
|
For now, that's the expected behavior:
There are use cases that recommends one strategy or the other... What do you think? |
|
I think it's good to keep the behavior as close to core as possible. AFAIK core Odoo sets the template image into the variant unless the variant has its own. That should be the same with this module. However I understand the complexity of this given the current implementation, so if you prefer to add a notice in the known issues and leave this for the future, it's OK for me. |
|
👍 |
|
cc @Tecnativa |
|
👍 |
|
@pedrobaeza For OCA/e-commerce runbot(version 8.0), seems to be failing due to product_multi_image. Please check version 8.0 of any session in runbot link below: Not sure why this module is affected in OCA/e-commerce. I noticed this problem when I created a PR(OCA/e-commerce#115) at OCA/e-commerce where runbot failed. More info on log: https://runbot.odoo-community.org/runbot/build/3150078 |
|
Solved in c26675c Launch rebuilds of the corresponding builds. |
|
@pedrobaeza thanks for the quick fix. |
With this PR, you can: