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

QWEB REPORTING : Create a module to replace the invoice report

By
BY-Systems
on 12/30/15, 5:04 PM 1,287 views

Dear all,

I am looking to create a module to replace the present invoice report.

Do you have any ideas or links to this?


Best Regards,

Youssef

3
Akash Balar
On 4/13/16, 6:40 AM

Hello,


Try another way to inherit report. 

Ex:-

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

<openerp>

    <data>

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

        <xpath expr="//t[@t-call='report.external_layout']" position="replace">

<t t-call="report.external_layout">

            <div class="page">

                       . . . . . . . . . . . . . . . . . . . . . . . . .

                       . . . . . . . . . . . . . . . . . . . . . . . . .

           </div>

</t>

       </xpath>

     </template>

  </data>

</openerp>

Thanks,

2

Jignesh Mehta

--Jignesh Mehta--
2087
| 6 4 8
Surat, India
--Jignesh Mehta--


Jignesh Mehta
On 1/5/16, 4:51 AM

Hello,


You can inherit the existing report through reports's id.


Create one custom report file and give id same as the existing inoive report.


Ex:-

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

<openerp>

    <data>

       <template id="report_invoice_document">


         Write your custom report code


     </template>

  </data>

</openerp>


Hope this helps you.


Thanks,

0
CHANDRASEKHAR ANEM
On 1/6/16, 11:46 PM

Hope it will helps you..

 

<!-- Inherit invoice report (from module account) -->

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

<xpath expr="//table[@class='table table-condensed']//thead//tr" position="replace">

<tr style="background-color:lightgray;">

<th>Description</th>

<th>Quantity</th>

<th class="text-right">Unit Price</th>

<th class="text-right" groups="sale.group_discount_per_so_line">Discount (%)</th>

<th class="text-right"></th>

<th class="text-right">Amount</th>

</tr>

</xpath>

<xpath expr="//tbody[@class='invoice_tbody']//tr//td[5]" position="replace">

<td class="text-right"></td>

</xpath>

<xpath expr="//div[@class='col-xs-4 pull-right']//table//tr[2]" position="replace">

</xpath>

<xpath expr="//div[@class='col-xs-4 pull-right']//table//tr[1]" position="replace">

</xpath>

<xpath expr="//div[@class='col-xs-6']//table" position="replace">

</xpath>

</template>

0
On 4/12/16, 3:17 PM

Hello, Salut Youssef,

I have currently the same problem as you had. Have you resolved it ? I'm currently in internship and i have to create a customized invoice. Can you please share your code, to help me and pick some of your elements ?

It could be so nice,


Thank you !

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: 12/30/15, 5:04 PM
Seen: 1287 times
Last updated: 4/13/16, 6:41 AM