[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>
This commit is contained in:
Lucas Perais (lpe)
2020-04-14 12:17:00 +00:00
parent f5ece86e53
commit 2ff76674d2
+1 -1
View File
@@ -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([])