mirror of
https://github.com/bringout/oca-technical.git
synced 2026-04-18 11:52:00 +02:00
173 lines
9 KiB
XML
173 lines
9 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<odoo>
|
|
<template id="report_payslip">
|
|
<t t-call="web.html_container">
|
|
<t t-foreach="docs" t-as="o">
|
|
<t t-call="web.external_layout">
|
|
<div class="page">
|
|
<h2>Pay Slip</h2>
|
|
<p t-field="o.name" />
|
|
<table class="table table-sm table-bordered">
|
|
<tr>
|
|
<td>
|
|
<strong>Name</strong>
|
|
</td>
|
|
<td>
|
|
<span t-field="o.employee_id" />
|
|
</td>
|
|
<td>
|
|
<strong>Radno mjesto</strong>
|
|
</td>
|
|
<td>
|
|
<span t-field="o.employee_id.job_id" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<strong>Address</strong>
|
|
</td>
|
|
<td colspan="3">
|
|
<div
|
|
t-field="o.employee_id.address_home_id"
|
|
t-options='{"widget": "contact", "fields": ["address", "name", "phone"],
|
|
"no_marker": True, "phone_icons": True}'
|
|
/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<strong>Email</strong>
|
|
</td>
|
|
<td>
|
|
<span t-field="o.employee_id.work_email" />
|
|
</td>
|
|
<td>
|
|
<strong>Identification No</strong>
|
|
</td>
|
|
<td>
|
|
<span t-field="o.employee_id.identification_id" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<strong>Reference</strong>
|
|
</td>
|
|
<td>
|
|
<span t-field="o.number" />
|
|
</td>
|
|
<td>
|
|
<strong>Bank Account</strong>
|
|
</td>
|
|
<td>
|
|
<span t-field="o.employee_id.bank_account_id" />
|
|
</td>
|
|
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<strong>Date From</strong>
|
|
</td>
|
|
<td>
|
|
<span t-field="o.date_from" />
|
|
</td>
|
|
<td>
|
|
<strong>Date To</strong>
|
|
</td>
|
|
<td>
|
|
<span t-field="o.date_to" />
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<t t-set="payslip_contracts" t-value="[]"/>
|
|
<t t-foreach="o.line_ids.filtered(lambda line: line.appears_on_payslip and line.quantity != 0)" t-as="l">
|
|
<t t-set="payslip_contracts" t-value="payslip_contracts + [l.contract_id]"/>
|
|
</t>
|
|
|
|
<t t-foreach="sorted(set(payslip_contracts), key=lambda contr: contr.date_start)" t-as="contract">
|
|
|
|
<table class="table table-sm table-bordered">
|
|
<tr>
|
|
<td>
|
|
<strong>Ugovor</strong>
|
|
</td>
|
|
<td>
|
|
<span t-field="contract.name" />
|
|
</td>
|
|
<td>
|
|
<strong>Od:</strong>
|
|
</td>
|
|
<td>
|
|
<span t-field="contract.date_start" />
|
|
</td>
|
|
<td>
|
|
<strong>Do:</strong>
|
|
</td>
|
|
<td>
|
|
<span t-field="contract.date_end" />
|
|
</td>
|
|
<td>
|
|
<strong>Broj bodova</strong>
|
|
</td>
|
|
<td>
|
|
<span t-field="contract.br_bod" />
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table class="table table-sm">
|
|
<thead>
|
|
<tr>
|
|
<th>Code</th>
|
|
<th>Name</th>
|
|
<th>Quantity/rate</th>
|
|
<th>Amount</th>
|
|
<th>Total</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr
|
|
t-foreach="o.line_ids.filtered(lambda line: line.appears_on_payslip and line.quantity != 0)"
|
|
t-as="line" >
|
|
|
|
<t t-if="contract.id==line.contract_id.id">
|
|
<td>
|
|
<span t-field="line.code" />
|
|
</td>
|
|
<td>
|
|
<span t-field="line.name" />
|
|
</td>
|
|
<td class="text-end">
|
|
<span t-esc="'{:g}'.format(line.quantity) if round(line.quantity,0)!=line.quantity else '{:.0f}'.format(line.quantity) if line.rate in (100.00, 0.0) else ('{:g}%'.format(line.rate) if round(line.rate,0)!=line.rate else '{:.0f}%'.format(line.rate))" />
|
|
</td>
|
|
<td class="text-end">
|
|
<span
|
|
t-esc="line.amount"
|
|
t-options='{"widget": "monetary", "display_currency": o.company_id.currency_id}'
|
|
/>
|
|
</td>
|
|
<td class="text-end">
|
|
<span
|
|
t-esc="line.total"
|
|
t-options='{"widget": "monetary", "display_currency": o.company_id.currency_id}'
|
|
/>
|
|
</td>
|
|
</t>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<t t-if="not contract_last">
|
|
<div style="page-break-after: always;"><br/></div>
|
|
</t>
|
|
</t>
|
|
|
|
|
|
|
|
<p class="text-end">
|
|
<strong>Authorized signature</strong>
|
|
</p>
|
|
</div>
|
|
</t>
|
|
</t>
|
|
</t>
|
|
</template>
|
|
</odoo>
|