b1654e5b2b8408639a324d6ca2b741adeb26cff4
In order to allow modifying background images, we need information on the image, this is done by creating a placeholder img and calling the loadImageInfo function on it. However this function did not account for the case where an image had not src attribute, which causes an unnecessary rpc. Other problems could arise from this as an attachment that doesn't have the correct mimetype but has a matching src could be returned, causing its image_src field to be false, which we would then attempt to load as a valid image, causing crashes. This commit fixes that by not trying to load image infos when the src of an image is empty, only looking for attachments of the supported mimetypes, and also checking that we actually did receive an image_src before setting it as the original src of the image, which will prevent accidentally trying to load a falsy src as an actual image. closes odoo/odoo#60982 X-original-commit: b0993370b6fcec1f966e4bf2994eee7f31da82d5 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%