diff options
| author | Thanh Dodeur <tso@odoo.com> | 2019-04-05 08:11:26 +0000 |
|---|---|---|
| committer | Thanh Dodeur <tso@odoo.com> | 2019-06-05 09:12:13 +0000 |
| commit | c212cfe8992292f57acacd809de26e1817533095 (patch) | |
| tree | 4ab6e06aa7e9e74087bc81fac2047b7c113ea941 /addons/web_editor/models | |
| parent | d6847bacb1d2425466003985f9e96837f22c2148 (diff) | |
[REF] *: removes datas_fname from ir.attachment
This commit removes the field `datas_fname` from `ir.attachment` as
it was unnecessary and most of the time the duplicate of `name` or
`url`.
Task #1909865
closes odoo/odoo#32976
Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
Diffstat (limited to 'addons/web_editor/models')
| -rw-r--r-- | addons/web_editor/models/assets.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/addons/web_editor/models/assets.py b/addons/web_editor/models/assets.py index 72b1b557e90..4178335624c 100644 --- a/addons/web_editor/models/assets.py +++ b/addons/web_editor/models/assets.py @@ -173,11 +173,10 @@ class Assets(models.AbstractModel): # If not, create a new attachment to copy the original scss/js file # content, with its modifications new_attach = { - 'name': custom_url, + 'name': url.split("/")[-1], 'type': "binary", 'mimetype': (file_type == 'js' and 'text/javascript' or 'text/scss'), 'datas': datas, - 'datas_fname': url.split("/")[-1], 'url': custom_url, } new_attach.update(self._save_asset_attachment_hook()) |
