From 66f0e26f6f3f2155fcfcc55e84f2e76cbfdb2c1d Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 6 Dec 2018 10:46:57 +0000 Subject: [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 --- addons/web_editor/models/test_models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web_editor/models/test_models.py') diff --git a/addons/web_editor/models/test_models.py b/addons/web_editor/models/test_models.py index f5eb7e86f64..d5ef48dc2af 100644 --- a/addons/web_editor/models/test_models.py +++ b/addons/web_editor/models/test_models.py @@ -16,7 +16,7 @@ class ConverterTest(models.Model): float = fields.Float() numeric = fields.Float(digits=(16, 2)) many2one = fields.Many2one('web_editor.converter.test.sub') - binary = fields.Binary() + binary = fields.Binary(attachment=False) date = fields.Date() datetime = fields.Datetime() selection = fields.Selection([ -- cgit v1.2.3