2c847afb3b1ccd81e218ef9eb269b9de7100d1e5
The wysiwyg component uses the ColorPalette, and gives it a callback in props (getTemplate). This callback does an orm service call and thus returns a promise. It is called by the ColorPalette in its willStart, and the result (the promise) is stored in the closure of the js module defining the ColorPalette, s.t. subsequent willStart directly reuse the promise instead of calling getTemplate. The problem is that the orm service (when defined via useService) is bound to the component using it. If the component is destroyed before the rpc returns, the promise is kept pending forever. It might thus happen that the ColorPalette stored a promise forever pending, leading to a screen never loading. It was for instance the case in Invoices (list view), when you clicked on a record: the form view might never open. In this situation, two renderings where initiated, the first one triggered the rpc, and the second one cancelled the first one, making the promise being pending forever. This commit bypasses useService to use the orm, which isn't the best solution but it's the easiest and fastest one. Ideally, this rpc should be done by a service, which could keep the promise in its closure. However, a lot of test suites would need to be adapted to make the service available for its tests. closes odoo/odoo#129974 Signed-off-by: Géry Debongnie <ged@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%