mirror of
https://github.com/bringout/oca-technical.git
synced 2026-04-18 14:52:01 +02:00
Initial commit: OCA Technical packages (595 packages)
This commit is contained in:
commit
2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions
173
odoo-bringout-oca-hack-payroll/payroll/views/report_payslip.xml
Normal file
173
odoo-bringout-oca-hack-payroll/payroll/views/report_payslip.xml
Normal file
|
|
@ -0,0 +1,173 @@
|
|||
<?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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue