summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--odoo/fields.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/odoo/fields.py b/odoo/fields.py
index 23d9a8c4a58..d64555e0025 100644
--- a/odoo/fields.py
+++ b/odoo/fields.py
@@ -2044,11 +2044,19 @@ class Binary(Field):
class Image(Binary):
"""Encapsulates an image, extending :class:`Binary`.
- :param int max_width: the maximum width of the image
- :param int max_height: the maximum height of the image
+ If image size is greater than the ``max_width``/``max_height`` limit of pixels, the image will be
+ resized to the limit by keeping aspect ratio.
+
+ :param int max_width: the maximum width of the image (default: ``0``, no limit)
+ :param int max_height: the maximum height of the image (default: ``0``, no limit)
:param bool verify_resolution: whether the image resolution should be verified
to ensure it doesn't go over the maximum image resolution (default: ``True``).
See :class:`odoo.tools.image.ImageProcess` for maximum image resolution (default: ``45e6``).
+
+ .. note::
+
+ If no ``max_width``/``max_height`` is specified (or is set to 0) and ``verify_resolution`` is False,
+ the field content won't be verified at all and a :class:`Binary` field should be used.
"""
max_width = 0
max_height = 0