This question has been flagged
1945 Views

We developed a custom Odoo module/app in order to modify the layout of the invoice being sent to customers.

When printing the invoice it works fine, but when we try to send an invoice by email, it falls back to something that does not even look like the default Odoo invoice.

Below code is the contents of our xml-file with the report contents removed to shorten the length of the post.

No major changes have been applied as we did just move around some of the field positions.

"

<?xml version="1.0" encoding="utf-8"?>

<openerp>

<data>

<template id="mycustom_reports_invoice" inherit_id="account.report_invoice_document">

<xpath expr="//div[@class='page']" position="replace">

<!-- replaced invoice layout here -->

</xpath>

</template>

 </data>

</openerp>

"

No errors are showing on screen or in the Odoo logfile when generating the report.

If I enable developer mode, find the invoice report and disable "reload from attachment" then it generates the same report for both print and email.

Why does this happen. Is there anything special I have to do in my module/app to get this working?

Avatar
Discard