diff options
| author | Lucas Perais (lpe) <lpe@odoo.com> | 2020-04-14 10:00:10 +0000 |
|---|---|---|
| committer | Lucas Perais (lpe) <lpe@odoo.com> | 2020-04-14 12:17:00 +0000 |
| commit | 2ff76674d2daa469616b327f4a024f3850063992 (patch) | |
| tree | a0461e84b0f47d4e3aa8a57e4e788893e9ca37d1 /addons/web | |
| parent | f5ece86e53f766acfc339c47a4a226f8f625c222 (diff) | |
[FIX] web: style attachment company specific always in bytes
Following https://github.com/odoo/odoo/pull/44393
Delete the qweb template `web.styles_company_report`
Recompute company specific style by going into
Settings > Configure Document Layout > change stuff and save
Print a report, in HTML to get an human readable error
(PDF rendering would just ignore the error)
Before this commit, there was an error "could not get asset content"
This was because the css asset created in db had a value of type string
whereas it should have been the same type as b64encode (which is byte-like)
After this commit, there is no error at rendering time
closes #49456
closes odoo/odoo#49529
X-original-commit: 2a7e06663c1281f0cf75f72fc491bc2cc39ef81c
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Diffstat (limited to 'addons/web')
| -rw-r--r-- | addons/web/models/models.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/models/models.py b/addons/web/models/models.py index bb9a865f161..7a55026eb05 100644 --- a/addons/web/models/models.py +++ b/addons/web/models/models.py @@ -384,7 +384,7 @@ class ResCompany(models.Model): def _get_asset_style_b64(self): template_style = self.env.ref('web.styles_company_report', raise_if_not_found=False) if not template_style: - return '' + return b'' # One bundle for everyone, so this method # necessarily updates the style for every company at once company_ids = self.sudo().search([]) |
