Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

[9.0]Modified invoice does not apply when sending by email

By
Kenneth Hansen
on 4/26/16, 3:12 AM 214 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?

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 4/26/16, 3:12 AM
Seen: 214 times
Last updated: 4/26/16, 3:18 AM