summaryrefslogtreecommitdiff
path: root/addons/mail/models
diff options
context:
space:
mode:
authorXavier Morel <xmo@odoo.com>2018-12-06 10:46:57 +0000
committerXavier Morel <xmo@odoo.com>2018-12-07 13:37:34 +0000
commit66f0e26f6f3f2155fcfcc55e84f2e76cbfdb2c1d (patch)
tree7dbd4cbc827e8455eb4d8bd4013003b8069fc448 /addons/mail/models
parent299f9f1eb06f9df950df1dc02e368caa9b3a9871 (diff)
[CHG] *: make binary fields default to attachment=True
Check that it makes custom binary fields into attachment as that's the main reason for the change: when users create binary fields via Studio, they're necessarily db-stored (as the interface doesn't allow altering the attachment attribute and it's unclear how we'd handle users switching it on/off every time), which significantly bloats their database (and burns storage & backup space), especially as the primary use case for binary fields is adding images and documents to records. * check that binary fields are properly created as attachment=True * add attachment=False on fields where that seems relevant (most but not all of the fields previously using the default) * remove occurrences of attachment=True closes odoo/odoo#29308
Diffstat (limited to 'addons/mail/models')
-rw-r--r--addons/mail/models/mail_channel.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/mail/models/mail_channel.py b/addons/mail/models/mail_channel.py
index f7384a87b8f..71e42eee3ff 100644
--- a/addons/mail/models/mail_channel.py
+++ b/addons/mail/models/mail_channel.py
@@ -101,13 +101,13 @@ class Channel(models.Model):
"Note that they will be able to manage their subscription manually "
"if necessary.")
# image: all image fields are base64 encoded and PIL-supported
- image = fields.Binary("Photo", default=_get_default_image, attachment=True,
+ image = fields.Binary("Photo", default=_get_default_image,
help="This field holds the image used as photo for the group, limited to 1024x1024px.")
- image_medium = fields.Binary('Medium-sized photo', attachment=True,
+ image_medium = fields.Binary('Medium-sized photo',
help="Medium-sized photo of the group. It is automatically "
"resized as a 128x128px image, with aspect ratio preserved. "
"Use this field in form views or some kanban views.")
- image_small = fields.Binary('Small-sized photo', attachment=True,
+ image_small = fields.Binary('Small-sized photo',
help="Small-sized photo of the group. It is automatically "
"resized as a 64x64px image, with aspect ratio preserved. "
"Use this field anywhere a small image is required.")