diff options
Diffstat (limited to 'addons/web_editor/controllers')
| -rw-r--r-- | addons/web_editor/controllers/main.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/addons/web_editor/controllers/main.py b/addons/web_editor/controllers/main.py index 7dbc3415f21..9509a541c88 100644 --- a/addons/web_editor/controllers/main.py +++ b/addons/web_editor/controllers/main.py @@ -146,6 +146,9 @@ class Web_Editor(http.Controller): # therefore we have to recover the files from the request object Attachments = request.env['ir.attachment'] # registry for the attachment table + website = request.env['website'].get_current_website() # # TO MOVE + + res_model = kwargs.get('res_model', 'ir.ui.view') if res_model != 'ir.ui.view' and kwargs.get('res_id'): res_id = int(kwargs['res_id']) @@ -167,6 +170,8 @@ class Web_Editor(http.Controller): 'public': res_model == 'ir.ui.view', 'res_id': res_id, 'res_model': res_model, + 'website_id': website.id, + }) attachment.generate_access_token() uploads += attachment.read(['name', 'mimetype', 'checksum', 'url', 'res_id', 'res_model', 'access_token']) @@ -198,6 +203,8 @@ class Web_Editor(http.Controller): 'public': res_model == 'ir.ui.view', 'res_id': res_id, 'res_model': res_model, + 'website_id': website.id, # TO MOVE IN WEBSITEID + }) attachment.generate_access_token() attachments += attachment |
