跳至内容
菜单
此问题已终结
2 回复
4457 查看

 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>

形象
丢弃
最佳答案

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

   


形象
丢弃
相关帖文 回复 查看 活动
0
10月 24
1660
0
8月 24
1491
0
1月 24
2012
1
11月 23
1709
0
6月 23
2025