32c8922432fd21ea01468ea05aa76fa1bb4c9890
In the module account_invoice_extract, the the code need to react to the 'pagerendered' event triggered by pdf.js. However in recent version of pdf.js, event are not visible outside of the library, except if the 'eventBusDispatchToDOM' has been set to true. We tried to set this option from outside of the library but without success, as our pdf viewer is in an iframe. There is no state of the iframe in which we can add an event listener to set the option. pdf.js has an event used to signal when we can set settings, called 'webviewerloaded'. This event is triggered in an EventListener attached to the 'DOMContentLoaded' event. So, to list options we had, we could: a) add an eventListener to the iframe document or window to react to 'webviewerloaded'. This doesn't work as document and windows are not the definitive ones and won't catche the event later. b) add an eventListener to the iframe to react to 'DOMContentLoaded', which doens't work too as our listener will be called after the pdf.js one. Finally the option was choosed to modify the default value of this option directly in pdf.js as no hook worked in the 'account_invoice_extract' module. closes odoo/odoo#47024 X-original-commit: 42e6f56c887c3175c76f0f84b8581e288ebc7daf Related: odoo/enterprise#9044 Signed-off-by: Florian Daloze (fda) <fda@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%