diff options
| author | qsm-odoo <qsm@odoo.com> | 2018-10-10 09:12:41 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2018-10-10 09:47:45 +0000 |
| commit | 3daab8ac16695806f672b9a772862c5a28f6e9b3 (patch) | |
| tree | ed43e28731f39aed46cfb1dcdd7fe67a829fc072 /addons/web/static/tests/fields/basic_fields_tests.js | |
| parent | 5ccba6c54a26d408dc6f0730a0a7e68d54b70025 (diff) | |
[FIX] web_editor, *: allow cropping all theme images
* base, website
An image URL may be like "/web/image/<xml_id>" where <xml_id> is the
xml id of an ir.attachment. In fact, the route does not use the xml_id
but the 'key' field, which is normally equal to the xml_id for standard
attachment. In the context of themes + multi-website, the value used as
an xml_id may refer to a theme.ir.attachment instead of an ir.attachment
and this led to a bug as those must not be used the same way.
The crop route which gets image information is adapted by this commit to
always look for the *current website* *ir.attachment* related to the
given xml_id/key.
Thanks to @kig-odoo for spotting the issue.
Closes https://github.com/odoo/odoo/pull/27588
closes odoo/odoo#27611
Diffstat (limited to 'addons/web/static/tests/fields/basic_fields_tests.js')
0 files changed, 0 insertions, 0 deletions
