summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJorge Pinna Puissant <jpp@odoo.com>2019-10-01 13:20:23 +0000
committerfw-bot <otis@odoo.com>2019-10-02 13:26:09 +0000
commite10a402531e879636d2c57606378d4a13cc696a4 (patch)
treeba03eaf63e00c9223ab92c86439adf9897d1c6c1
parent934dd57b819303170d5bb50d4e8201ed40f7d563 (diff)
[FIX] base: debug assets in multi-website/multi-company
Before this commit, the assets were not found when the user is connected in mode debug assets in a multi-website and multi-company. This occurs because the attachments (assets) were created with the number of the first website accessed, and cannot be loaded when trying to access the second website. The website_id is added in the creation of the views see: 092870270eb059bc848f82684a4d1d4b84758e30 Now, the attachments are created without the website number and is shared between all the websites. opw-2076768 closes odoo/odoo#37789 X-original-commit: 42eec88e5da164e4930c48113109f2c8d4b73da3 Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
-rw-r--r--odoo/addons/base/models/assetsbundle.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/odoo/addons/base/models/assetsbundle.py b/odoo/addons/base/models/assetsbundle.py
index f5f344e6c5f..17eae1d100b 100644
--- a/odoo/addons/base/models/assetsbundle.py
+++ b/odoo/addons/base/models/assetsbundle.py
@@ -437,7 +437,7 @@ class AssetsBundle(object):
fname = os.path.basename(asset.url)
url = asset.html_url
with self.env.cr.savepoint():
- self.env['ir.attachment'].sudo().create(dict(
+ self.env['ir.attachment'].sudo().with_context(not_force_website_id=True).create(dict(
datas=base64.b64encode(asset.content.encode('utf8')),
mimetype='text/css',
type='binary',