How can obtain the report file from the invoice report cache


Is it possible to get the .odt file from the cache?


Just like you can retrieve any other report.
What is your question exactly?

I need to send an email when the invoice is posted with the report as an attachment. Sorry if the question is very basic.

Then you should use the notification email module.

There you can define the report to use to generate the email, the attachments added to the email (which would be the invoice report) and a trigger that will be used to define when to send it (state is posted).

There is no stupid question :smiley:.

1 Like

Just one consideration here: Take care to set a limit of 1 to the trigger, otherwise when the invoice goes back to posted state (for example when unreconciling it’s payment lines) the invoice will be resend to the customer.

Or you can just use a trigger like: Eval('self', {}).get('state').in_(['posted', 'paid'])

Thanks, it helped me a lot.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.