diff --git a/base_conditional_image/README.rst b/base_conditional_image/README.rst index 263272624..1e7ecba13 100644 --- a/base_conditional_image/README.rst +++ b/base_conditional_image/README.rst @@ -14,13 +14,13 @@ Conditional Images :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fserver--tools-lightgray.png?logo=github - :target: https://github.com/OCA/server-tools/tree/12.0/base_conditional_image + :target: https://github.com/OCA/server-tools/tree/14.0/base_conditional_image :alt: OCA/server-tools .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/server-tools-12-0/server-tools-12-0-base_conditional_image + :target: https://translation.odoo-community.org/projects/server-tools-14-0/server-tools-14-0-base_conditional_image :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/149/12.0 + :target: https://runbot.odoo-community.org/runbot/149/14.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -71,7 +71,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -86,7 +86,15 @@ Authors Contributors ~~~~~~~~~~~~ -* Patrick Tombez +* `Camptocamp `_: + * Patrick Tombez +* `Trobz `_: + * Son Ho + +Other credits +~~~~~~~~~~~~~ + +The migration of this module from 12.0 to 14.0 was financially supported by Camptocamp Maintainers ~~~~~~~~~~~ @@ -101,6 +109,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/server-tools `_ project on GitHub. +This module is part of the `OCA/server-tools `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/base_conditional_image/__manifest__.py b/base_conditional_image/__manifest__.py index 9e8916fee..acaa3b7d9 100644 --- a/base_conditional_image/__manifest__.py +++ b/base_conditional_image/__manifest__.py @@ -3,7 +3,8 @@ { "name": "Conditional Images", - "version": "12.0.1.0.1", + "summary": "This module extends the functionality to support conditional images", + "version": "14.0.1.0.0", "author": "Camptocamp, Odoo Community Association (OCA)", "license": "AGPL-3", "category": "Misc", diff --git a/base_conditional_image/models/image.py b/base_conditional_image/models/image.py index 2a14674e1..fa211a235 100644 --- a/base_conditional_image/models/image.py +++ b/base_conditional_image/models/image.py @@ -51,7 +51,10 @@ class Image(models.Model): @api.model def _process_images(self, vals, required=False): if {"image", "image_medium", "image_small"} & set(vals.keys()): - tools.image_resize_images(vals) + vals["image_medium"] = tools.image_process( + vals.get("image"), size=(128, 128) + ) + vals["image_small"] = tools.image_process(vals.get("image"), size=(64, 64)) elif required: raise ValidationError(_("At least one image type must be specified")) @@ -60,7 +63,6 @@ class Image(models.Model): self._process_images(vals, required=True) return super().create(vals) - @api.multi def write(self, vals): self._process_images(vals) return super().write(vals) diff --git a/base_conditional_image/readme/CONTRIBUTORS.rst b/base_conditional_image/readme/CONTRIBUTORS.rst index 78f10eddd..0b6b45600 100644 --- a/base_conditional_image/readme/CONTRIBUTORS.rst +++ b/base_conditional_image/readme/CONTRIBUTORS.rst @@ -1 +1,4 @@ -* Patrick Tombez +* `Camptocamp `_: + * Patrick Tombez +* `Trobz `_: + * Son Ho diff --git a/base_conditional_image/readme/CREDITS.rst b/base_conditional_image/readme/CREDITS.rst new file mode 100644 index 000000000..ca6e4f9cd --- /dev/null +++ b/base_conditional_image/readme/CREDITS.rst @@ -0,0 +1 @@ +The migration of this module from 12.0 to 14.0 was financially supported by Camptocamp diff --git a/base_conditional_image/static/description/index.html b/base_conditional_image/static/description/index.html index 63a9f2d3a..8104731a5 100644 --- a/base_conditional_image/static/description/index.html +++ b/base_conditional_image/static/description/index.html @@ -3,7 +3,7 @@ - + Conditional Images