688897cf10b316739150d2ffd6bae01185e7daff
In case of error, the send & print wizard is crashing or log an error on the invoice chatter. In that case, nothing is sent to the end-customer. This is problematic for all flows in which we want to send a mail to the customer automatically. For example, e-commerce with automatic invoicing or subscription/recurring invoices. To avoid that, the current logic of the send & print has been reshaped. In case of error, a proforma PDF is sent instead. This is exactly the same document as the PDF but without the legal layer. To do that, a lot of refactoring has been necessary to always provide the cumulated data for invoices to be able to access the generated proforma report and to allow the overrides to know exactly in which mode the hooks are called. Also, this commit renames the method by something less generic about invoices. Indeed, this wizard needs to be usable for others documents than invoices. That's the purpose of the invoice_single/invoice_multi mode. For that reason, all methods about invoices are now expricitely prefixed by 'invoice'. Fix also a performance issue on multi-invoices since the invoice_pdf_report_id document was invalided for the whole model instead of the current record. When dealing with X invoices, the whole model was invalidated X times. Fix the managment of attachments: - The manual attachments wasn't send when sending a mail 'invoice_single' mode. - When changing to another mail template, the manual attachments were lost. Fix the double generation of PDF using a web-service. When opening again the send & print wizard, the PDF must not be regenerated but reloaded from the previous one. Task: 3339352 X-original-commit: e9e90811aeee46989a83b21f9b59071a9c7bc362 Part-of: odoo/odoo#124436
…
…
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%