summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorRomain Derie <rde@odoo.com>2020-03-17 17:18:06 +0000
committerJeremy Kersten <jke@odoo.com>2020-03-30 16:06:13 +0000
commit30f4f610bf146638b71a0b2a936f8ae9acef502e (patch)
tree4154b2e6f59e271a96284069591dd5834286de49 /addons/web/static/src
parentf425aee52b9ff7ac4d83209d06dd8b4ab82a2303 (diff)
[IMP] website: improvement regarding social image
This commit introduce multiple improvements regarding social image: - (perf) Don't read ir.attachment through `social_default_image` when it is not needed. Use a stored boolean to know if the field should be accessed. This will remove one SQL query in attachment for public user. - Show website logo, not the company logo since we now have a different logo for website. - Don't show images lower than 200 width or 200 height px. Logo will be shown regardless of his size. - Don't show website logo if there is a website social_default_image. Indeed, the spec was to prevent showing logo and social_default_image if they are the same image. Technically, this is hard to identify as they could be the same image uploaded with different resolutions (media dialog), especially if one of those was uploaded through the backend and one from the frontend. It is most likely we will never correctly identify duplicate as they won't be exactly the same. For this reason, it makes more sense to hide the website logo if the social_default_image is set. It avoids every issues while it makes sense since you won't want to use the logo over the social_default_image. If you really want to, you could reupload it through the SEO media dialog. closes odoo/odoo#47848 Related: odoo/upgrade#1012 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com> Co-authored-by: Romain Derie <rde@odoo.com> Co-authored-by: Jeremy Kersten <jke@odoo.com>
Diffstat (limited to 'addons/web/static/src')
0 files changed, 0 insertions, 0 deletions