[8.0][base_multi_image] Base module for models with multiple images (a gallery)#374
[8.0][base_multi_image] Base module for models with multiple images (a gallery)#374pedrobaeza merged 11 commits intoOCA:8.0from yajo:multi_image
Conversation
|
Thanks |
|
It's easy to refresh the image to make it look when selected? |
|
Please @pedrobaeza @antespi @dreispt could you take a look here? |
base_multi_image/README.rst
Outdated
|
|
||
| class MyOwner(models.Model): | ||
| _name = "mymodule.name" | ||
| _inherit = "base_multi_image.owner" |
There was a problem hiding this comment.
The most common example will inherit from an existing model and this abstract one, so I think it's better to put it here:
class ...:
_name = "name"
_inherit = ["base_multi_image.owner", "base_model"]
|
LGTM 👍 |
| * Sharoon Thomas | ||
| * Pedro M. Baeza <[email protected]> | ||
| * Rafael Blasco <[email protected]> | ||
| * Jairo Llopis <[email protected]> |
There was a problem hiding this comment.
Akretion has nothing to do with this. Why do you say that?
|
I'm thinking that is interesting to have a controller that allows to retrieve these images via a URL, so that you can link them in any other site. |
| return False | ||
|
|
||
| @api.multi | ||
| def _get_image_from_url(self): |
There was a problem hiding this comment.
Should we consider using api cache here?
There was a problem hiding this comment.
That was desirable, but for now, there's no cache mechanism. Do you know any quick mechanism?
There was a problem hiding this comment.
|
Nice feature, smart implementation, well done! |
|
All should be fixed. |
|
@yajo following discussion above, it would be nice to add to the README Roadmap, the idea of adding a "attachment" storage mode. Maybe someone contributes that in the future. |
@pedrobaeza I think that should go on the website companion module. I think @yajo also isolated that in a module. |
|
@dreispt, I thought about putting on website module, but it's something similar to report, that has a controller for getting reports even without website installed. |
|
LGTM 👍 |
|
@pedrobaeza OK. My concern in only to avoid pushing the website dependency. That could be added now ot put in the roadmap. |
|
@dreispt, you don't need website for making a controller. See the report example. |
|
Thanks! 👍 the first piece |
|
@yajo, can you add the missing features commented to the Known issues section? |
|
Which known issues @pedrobaeza ? |
|
It has been discussed all over the PR: store as attachment and so on |
|
Yes, hold on. |
|
There you have the known issues. About the controller, Odoo already includes This should be ready to merge then. |
[8.0][base_multi_image] Base module for models with multiple images (a gallery)
|
🎉 |
Syncing from upstream OCA/server-tools (12.0)
Following what was discussed in OCA/product-attribute#112, this is the base part of the module stack, without website dependencies.
This module allows other submodules to implement multiple images in very few steps.
@rafaelbn