Skip to Content
Menu
This question has been flagged
2 Replies
3959 Views

 After click the "Print" button,duplicate "Print Employee Repoort" will display.

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<report
id="hr_employee_print_report"
string="Print Employee Repoort"
model="hr.employee"
report_type="qweb-pdf"
name="hr.print_employee_report"
file="hr.print_employee_report"
print_report_name="'Print Employee Report"
/>

<template id="print_employee_report">
<t t-call="web.html_container">
<t t-call="web.external_layout">
<div class="page">
<div class="oe_structure"/>
<div class="row" style="margin-top:10px;">
<div class="col-lg-12">
<h2>
<span>Timesheet Entries</span>
</h2>
</div>
</div>
<div class="row" style="margin-top:10px;">
<div class="col-lg-12">
<table class="table table-sm">
<thead>
<tr>
<th><span>Name</span></th>
<th><span>Hire Date</span></th>
<th><span>Start</span></th>
<th><span>End</span></th>
<th><span>Resign Date</span></th>
<th><span>Department</span></th>
</tr>
</thead>
<tbody>
<tr t-foreach="docs" t-as="l">
<td>
<span t-field="l.name"/>
</td>
<td>
<span t-field="l.hire_date"/>
</td>
<td>
<span t-field="l.count_start"/>
</td>
<td>
<span t-field="l.count_end"/>
</td>
<td>
<t t-if="l.resign_date != datetime.datetime.strptime('3000-12-31','%Y-%m-%d')">
<span t-field="l.resign_date"/>
</t>
</td>
<td>
<span t-field="l.department_id"/>
</td>
</tr>
<tr>
<td />
<td />
<td class="text-right"><strong>Client Confirmation(Signature)________________</strong></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="oe_structure"/>
</div>
</t>
</t>
</template>
</odoo>

Avatar
Discard
Best Answer

Hello ,

<tr t-foreach="docs" t-as="l"> you need to remove this line after <tbody> and put before <div class="page"> line like <t t-foreach="docs" t-as="l"> this.

Hope it helps 

Regards,




Email: odoo@aktivsoftware.com

Skype: kalpeshmaheshwari

   


Avatar
Discard
Related Posts Replies Views Activity
0
Oct 24
155
0
Aug 24
164
0
Jan 24
728
1
Nov 23
415
0
Jun 23
970