Skip to Content
Menu
This question has been flagged
2 Replies
19908 Zobrazenia

hr.report.xml

<?xml version="1.0"?>
<odoo>

<report
id="action_report_holidayssummary"
string="Cost Recovery"
model="hhd.cost.recovery"
report_type="qweb-pdf"
name="hhd_cost_recovery.report_session_view"
file="hhd_cost_recovery.report_session"
menu="False"/>

<record id="action_report_holidayssummary" model="ir.actions.report">
<field name="paperformat_id" ref="hr_holidays.paperformat_hrsummary"/>
</record>


</odoo>






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

<template id="report_session_view">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="doc">
<t t-call="web.external_layout">
<div class="page">
<h2 t-field="doc.name"/>
<p>From <span t-field="doc.date_from"/> to <span t-field="doc.date_to "/></p>
<h3>Customer:</h3>
<ul>
<t t-foreach="doc.employee_id" t-as="employee">
<li><span t-field="employee .name"/></li>
</t>
</ul>
</div>
</t>
</t>
</t>
</template>

</odoo>


Avatar
Zrušiť
Best Answer

Hi,

please refer this:

https://www.odoo.com/documentation/12.0/reference/reports.html

hope it will useful for you..


Avatar
Zrušiť