summaryrefslogtreecommitdiff
path: root/addons/website_event_track/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/website_event_track/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/website_event_track/models')
-rw-r--r--addons/website_event_track/models/event_track.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/website_event_track/models/event_track.py b/addons/website_event_track/models/event_track.py
index 1c4758d50af..23df5bbac3e 100644
--- a/addons/website_event_track/models/event_track.py
+++ b/addons/website_event_track/models/event_track.py
@@ -88,7 +88,7 @@ class Track(models.Model):
('0', 'Low'), ('1', 'Medium'),
('2', 'High'), ('3', 'Highest')],
'Priority', required=True, default='1')
- image = fields.Binary('Image', related='partner_id.image_medium', store=True, attachment=True, readonly=False)
+ image = fields.Binary('Image', related='partner_id.image_medium', store=True, readonly=False)
@api.multi
@api.depends('name')
@@ -210,4 +210,4 @@ class Sponsor(models.Model):
partner_id = fields.Many2one('res.partner', 'Sponsor/Customer', required=True)
url = fields.Char('Sponsor Website')
sequence = fields.Integer('Sequence', store=True, related='sponsor_type_id.sequence', readonly=False)
- image_medium = fields.Binary(string='Logo', related='partner_id.image_medium', store=True, attachment=True, readonly=False)
+ image_medium = fields.Binary(string='Logo', related='partner_id.image_medium', store=True, readonly=False)