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 --- odoo/addons/base/wizard/base_import_language.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'odoo/addons/base/wizard/base_import_language.py') diff --git a/odoo/addons/base/wizard/base_import_language.py b/odoo/addons/base/wizard/base_import_language.py index aea906b8dc9..1017806119e 100644 --- a/odoo/addons/base/wizard/base_import_language.py +++ b/odoo/addons/base/wizard/base_import_language.py @@ -19,7 +19,7 @@ class BaseLanguageImport(models.TransientModel): name = fields.Char('Language Name', required=True) code = fields.Char('ISO Code', size=5, required=True, help="ISO Language and Country code, e.g. en_US") - data = fields.Binary('File', required=True) + data = fields.Binary('File', required=True, attachment=False) filename = fields.Char('File Name', required=True) overwrite = fields.Boolean('Overwrite Existing Terms', help="If you enable this option, existing translations (including custom ones) " -- cgit v1.2.3