Hello all. I am looking for a simple solution to automatically generate the invoice report at the same time as posting the invoice, instead of having to do two steps (1. confirm or post the invoice, 2. print the invoice report).
I am using Odoo 16 Community. Default behavior of invoicing is that you press CONFIRM to save/post the invoice. This posts the invoice but does not generate the report. Then the PRINT button is enabled and you can now print the invoice which generates either the HTML or PDF version of the invoice report.
I would like to link these two actions into a single button clilck, so that upon posting the invoice, the invoice report is generated. (Ultimately, I want to automatically print the invoice when it is saved/posted.) Just one step.
I have tried to add a call to the method that generates the invoice report, at the end of the action_post method for the invoice, but it does not do anything. I can't figure out how to combine these two methods so that the invoice report is automatically generated.
Any help on this would be appreciated.