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
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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
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,
It does not work for me, i tried with it in the purchase order report.
Element '<xpath expr="//t[@t-call='web.external_layout_standard']//div[@name='moto']">' cannot be located in parent view
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,
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>
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
Inscribirse| Publicaciones relacionadas | Respuestas | Vistas | Actividad | |
|---|---|---|---|---|
|
0
abr 24
|
2606 | |||
|
1
ago 23
|
7414 | |||
|
|
2
abr 18
|
20286 | ||
|
1
oct 15
|
7710 | |||
|
|
2
jun 25
|
3237 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.