Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Inheriting and
modifying QWeb
reports
OCTOBER 3, 2015 YENTHE666
http://www.odoo.yenthevg.com/inheriting-and-modifying-qweb-reports/ 7/22
12/31/2018 Inheriting and modifying QWeb reports - Odoo tutorials
Hi guys,
http://www.odoo.yenthevg.com/inheriting-and-modifying-qweb-reports/ 8/22
12/31/2018 Inheriting and modifying QWeb reports - Odoo tutorials
Now that you’ve found your report click on it. This will
open a new view where you will nd all the technical
information you need! For example with the quotation
report:
http://www.odoo.yenthevg.com/inheriting-and-modifying-qweb-reports/ 9/22
12/31/2018 Inheriting and modifying QWeb reports - Odoo tutorials
here!
For this example I will remove the columns that show
the amount, the tax and the price per item. The rst
step is to modify the table header:
1 <xpath expr="//tbody[@class='sale_tbody']//t
2 </xpath>
3 <xpath expr="//tbody[@class='sale_tbody']//t
4 </xpath>
http://www.odoo.yenthevg.com/inheriting-and-modifying-qweb-reports/ 10/22
12/31/2018 Inheriting and modifying QWeb reports - Odoo tutorials
5 <xpath expr="//tbody[@class='sale_tbody']//t
6 </xpath>
1 <openerp>
2 <data>
3 <!-- Inherit quotation report (from
from
4 <template id="report_quotation_inhe
5 <!-- Finds the first table with as
6 This will replace everything withi
7 <xpath expr="//table[@class='table
8 <tr style="background-c
9 <th>Description</th
10 <th class="text-rig
11 </tr>
12 </xpath>
13 <xpath expr="//tbody[@class='sale_t
14 </xpath>
15 <xpath expr="//tbody[@class='sale_t
16
17
18
</xpath>
<xpath expr="//tbody[@class='sale_t
</xpath>
19 </template>
20 </data>
21 </openerp>
If you would now print out the report you would get
this as a result:
http://www.odoo.yenthevg.com/inheriting-and-modifying-qweb-reports/ 11/22
12/31/2018 Inheriting and modifying QWeb reports - Odoo tutorials
Now take back that ‘External ID’ from the QWeb report
and take the rst part of the external id (before the
dot). This tells you which module you should add as a
dependency:
4. Conclusion
Share this:
Share
Like this:
Like
Laura
Hi!
http://www.odoo.yenthevg.com/inheriting-and-modifying-qweb-reports/ 13/22