Initial commit: OCA Technical packages (595 packages)

This commit is contained in:
Ernad Husremovic 2025-08-29 15:43:03 +02:00
commit 2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="hr_contract_view_form" model="ir.ui.view">
<field name="name">hr.contract.view.form.payroll</field>
<field name="model">hr.contract</field>
<field name="inherit_id" ref="hr_contract.hr_contract_view_form" />
<field name="arch" type="xml">
<xpath expr="//group[@name='salary']" position="inside">
<field name="struct_id" required="1" />
<field name="company_id" groups="base.group_multi_company" />
<field name="currency_id" invisible="1" />
</xpath>
<xpath expr="//field[@name='wage']" position="after">
<field name="schedule_pay" />
</xpath>
</field>
</record>
</odoo>

View file

@ -0,0 +1,91 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="hr_contribution_register_view_tree" model="ir.ui.view">
<field name="name">hr.contribution.register.tree</field>
<field name="model">hr.contribution.register</field>
<field name="arch" type="xml">
<tree string="Contribution Registers">
<field name="name" />
<field
name="company_id"
groups="base.group_multi_company"
options="{'no_create': True}"
/>
</tree>
</field>
</record>
<record id="hr_contribution_register_view_kanban" model="ir.ui.view">
<field name="name">hr.contribution.register.kanban</field>
<field name="model">hr.contribution.register</field>
<field name="arch" type="xml">
<kanban class="o_kanban_mobile">
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_content oe_kanban_global_click">
<div class="row">
<div class="col-12">
<strong>
<field name="name" />
</strong>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="hr_contribution_register_view_search" model="ir.ui.view">
<field name="name">hr.contribution.register.search</field>
<field name="model">hr.contribution.register</field>
<field name="arch" type="xml">
<search string="Contribution Registers">
<field name="name" string="Contribution Registers" />
<field name="company_id" groups="base.group_multi_company" />
</search>
</field>
</record>
<record id="hr_contribution_register_view_form" model="ir.ui.view">
<field name="name">hr.contribution.register.form</field>
<field name="model">hr.contribution.register</field>
<field name="arch" type="xml">
<form string="Contribution">
<group>
<field name="name" />
<field name="partner_id" />
<field
name="company_id"
groups="base.group_multi_company"
options="{'no_create': True}"
class="oe_inline"
/>
</group>
<newline />
<group>
<separator string="Description" />
<newline />
<field name="note" nolabel="1" />
</group>
</form>
</field>
</record>
<record id="hr_contribution_register_action" model="ir.actions.act_window">
<field name="name">Contribution Registers</field>
<field name="res_model">hr.contribution.register</field>
<field name="view_mode">tree,kanban,form</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">Add a new contribution register</p>
<p>
A contribution register is a third party involved in the salary
payment of the employees. It can be the social security, the
state or anyone that collect or inject money on payslips.
</p>
</field>
</record>
<menuitem
id="hr_contribution_register_menu"
action="hr_contribution_register_action"
parent="payroll_menu_configuration"
sequence="14"
/>
</odoo>

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!-- Employee View -->
<record id="hr_employee_view_form" model="ir.ui.view">
<field name="name">hr.employee.view.form.payroll</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form" />
<field name="arch" type="xml">
<xpath expr="//div[@name='button_box']" position="inside">
<button
name="%(hr_payslip_action_employee)d"
class="oe_stat_button"
icon="fa-money"
type="action"
groups="payroll.group_payroll_user"
>
<field name="payslip_count" widget="statinfo" string="Payslips" />
</button>
</xpath>
</field>
</record>
</odoo>

View file

@ -0,0 +1,119 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="hr_payroll_structure_view_tree" model="ir.ui.view">
<field name="name">hr.payroll.structure.tree</field>
<field name="model">hr.payroll.structure</field>
<field name="arch" type="xml">
<tree string="Employee Function">
<field name="name" />
<field name="code" />
<field name="rule_ids" />
<field
name="company_id"
groups="base.group_multi_company"
options="{'no_create': True}"
/>
</tree>
</field>
</record>
<record id="hr_payroll_structure_view_tree_children" model="ir.ui.view">
<field name="name">hr.payroll.structure.tree</field>
<field name="model">hr.payroll.structure</field>
<field name="field_parent">children_ids</field>
<field name="arch" type="xml">
<tree string="Salary Structure">
<field name="name" />
<field name="code" />
<field
name="company_id"
groups="base.group_multi_company"
options="{'no_create': True}"
/>
</tree>
</field>
</record>
<record id="hr_payroll_structure_view_kanban" model="ir.ui.view">
<field name="name">hr.payroll.structure.kanban</field>
<field name="model">hr.payroll.structure</field>
<field name="arch" type="xml">
<kanban class="o_kanban_mobile">
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_content oe_kanban_global_click">
<div class="row">
<div class="col-12">
<strong>
<field name="name" />
</strong>
</div>
</div>
<div class="row">
<div class="col-12">
<span>
Code:
<field name="code" />
</span>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="hr_payroll_structure_view_search" model="ir.ui.view">
<field name="name">hr.payroll.structure.select</field>
<field name="model">hr.payroll.structure</field>
<field name="arch" type="xml">
<search string="Payroll Structures">
<field
name="name"
string="Payroll Structures"
filter_domain="['|',('name','ilike',self),('code','ilike',self)]"
/>
</search>
</field>
</record>
<record id="hr_payroll_structure_view_form" model="ir.ui.view">
<field name="name">hr.payroll.structure.form</field>
<field name="model">hr.payroll.structure</field>
<field name="arch" type="xml">
<form string="Employee Function">
<group col="4">
<field name="name" />
<field name="code" />
<field name="parent_id" />
<field
name="company_id"
groups="base.group_multi_company"
options="{'no_create': True}"
/>
</group>
<notebook colspan="4">
<page string="Salary Rules">
<field name="rule_ids" domain="[('parent_rule_id','=',False)]">
<tree>
<field name="name" />
<field name="code" />
<field name="category_id" />
<field name="sequence" invisible="1" />
<field name="register_id" />
</tree>
</field>
</page>
</notebook>
</form>
</field>
</record>
<record id="hr_payroll_structure_action" model="ir.actions.act_window">
<field name="name">Salary Structures</field>
<field name="res_model">hr.payroll.structure</field>
<field name="view_mode">tree,kanban,form</field>
</record>
<menuitem
id="hr_payroll_structure_menu"
action="hr_payroll_structure_action"
parent="payroll_menu_configuration"
sequence="2"
/>
</odoo>

View file

@ -0,0 +1,173 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="hr_payslip_line_view_tree" model="ir.ui.view">
<field name="name">hr.payslip.line.tree</field>
<field name="model">hr.payslip.line</field>
<field name="arch" type="xml">
<tree
string="Salary Structure"
editable="bottom"
decoration-info="total == 0"
>
<field name="category_id" />
<field name="employee_id" invisible="1" />
<field name="sequence" />
<field name="name" />
<field name="code" />
<field name="quantity" />
<field name="rate" />
<field name="amount" />
<field name="total" />
<field name="amount_select" invisible="1" />
<field name="register_id" invisible="1" />
<field name="payslip_run_id" optional="hide" />
</tree>
</field>
</record>
<record id="hr_payslip_line_view_form" model="ir.ui.view">
<field name="name">hr.payslip.line.form</field>
<field name="model">hr.payslip.line</field>
<field name="arch" type="xml">
<form string="Payslip Line">
<h2>
<field name="slip_id" readonly="1" />
</h2>
<group>
<group string="Payslip Line Details">
<field name="name" />
<field name="code" readonly="1" />
<field name="employee_id" readonly="1" />
<field name="contract_id" readonly="1" />
</group>
<group string="Calculations">
<field name="category_id" readonly="1" />
<field name="amount_select" readonly="1" />
<field
name="amount_fix"
attrs="{'invisible':[('amount_select','!=','fix')]}"
readonly="1"
/>
<field
name="amount_percentage"
attrs="{'invisible':[('amount_select','!=','percentage')]}"
readonly="1"
/>
<field name="sequence" readonly="1" />
<separator />
<field name="quantity" readonly="1" />
<field name="rate" readonly="1" />
<field name="amount" readonly="1" />
<field name="total" decoration-bf="1" readonly="1" />
</group>
<field name="note" />
</group>
<notebook>
<page name="child_ids" string="Child Line Details">
<group>
<field name="child_ids" readonly="1" nolabel="1">
<tree
string="Child Salary Structure"
editable="false"
decoration-info="total == 0"
decoration-bf="parent_line_id == False"
>
<field name="sequence" invisible="1" />
<field name="parent_line_id" invisible="1" />
<field name="name" />
<field name="code" />
<field name="category_id" />
<field name="salary_rule_id" />
<field name="quantity" />
<field name="rate" />
<field name="amount" />
<field
name="total"
decoration-danger="0 > total and parent_line_id == False"
decoration-success="total > 0 and parent_line_id == False"
sum="total_net"
/>
</tree>
</field>
</group>
</page>
</notebook>
</form>
</field>
</record>
<record id="hr_payslip_line_view_pivot" model="ir.ui.view">
<field name="name">hr.payslip.line.pivot</field>
<field name="model">hr.payslip.line</field>
<field name="mode">primary</field>
<field name="priority" eval="20" />
<field name="arch" type="xml">
<pivot>
<field name="salary_rule_id" type="row" />
<field name="total" type="measure" />
</pivot>
</field>
</record>
<record id="hr_payslip_line_view_search" model="ir.ui.view">
<field name="name">hr.payslip.line.select</field>
<field name="model">hr.payslip.line</field>
<field name="arch" type="xml">
<search string="Search Payslip Lines">
<field
name="name"
string="Payslip Lines"
filter_domain="['|',('name','ilike',self),('code','ilike',self)]"
/>
<field name="amount_select" />
<field name="slip_id" />
<field name="payslip_run_id" />
<group col="8" colspan="4" expand="0" string="Group By">
<filter
string="Salary Rule Category"
name="category_id"
context="{'group_by':'category_id'}"
/>
<filter
string="Contribution Register"
name="register_id"
context="{'group_by':'register_id'}"
/>
<filter
string="Amount Type"
name="amount_select"
context="{'group_by':'amount_select'}"
/>
<filter
string="Employees"
name="employee_id"
context="{'group_by':'employee_id'}"
/>
</group>
</search>
</field>
</record>
<record id="hr_payslip_line_action" model="ir.actions.act_window">
<field name="name">Payslip Lines</field>
<field name="res_model">hr.payslip.line</field>
<field name="domain">[('register_id', '=', active_id)]</field>
<field name="context">
{'default_register_id': active_id, 'search_default_register_id': 1}
</field>
<field name="binding_model_id" ref="model_hr_payslip" />
</record>
<record
id="hr_payslip_line_action_computation_details"
model="ir.actions.act_window"
>
<field name="name">Payslip Computation Details</field>
<field name="res_model">hr.payslip.line</field>
<field name="view_mode">tree,pivot,form</field>
<field name="domain">[('slip_id', 'in', active_ids)]</field>
<field name="binding_model_id" ref="model_hr_payslip" />
</record>
<record id="action_get_batch_payslip_lines" model="ir.actions.act_window">
<field name="name">Batch Payslip Lines</field>
<field name="res_model">hr.payslip.line</field>
<field name="view_mode">pivot,tree,form</field>
<field name="domain">[('payslip_run_id', 'in', active_ids)]</field>
<field name="binding_model_id" ref="model_hr_payslip_run" />
</record>
</odoo>

View file

@ -0,0 +1,163 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!-- payslip runs -->
<record id="hr_payslip_run_view_search" model="ir.ui.view">
<field name="name">hr.payslip.run.search</field>
<field name="model">hr.payslip.run</field>
<field name="arch" type="xml">
<search string="Search Payslip Batches">
<field name="name" string="Payslip Batches" />
<field name="date_start" />
<field name="date_end" />
<filter
string="Draft"
name="draft"
domain="[('state','=','draft')]"
help="Draft Payslip Batches"
/>
<filter
name="done_filter"
string="Done"
domain="[('state','=','close')]"
help="Done Payslip Batches"
/>
</search>
</field>
</record>
<record id="hr_payslip_run_view_tree" model="ir.ui.view">
<field name="name">hr.payslip.run.tree</field>
<field name="model">hr.payslip.run</field>
<field name="arch" type="xml">
<tree
decoration-info="state in ('confirm','hr_check','accont_check')"
decoration-muted="state == 'cancel'"
string="Payslips Batches"
multi_edit="1"
sample="1"
>
<field name="name" />
<field name="date_start" decoration-bf="1" />
<field name="date_end" decoration-bf="1" />
<field name="activity_ids" widget="list_activity" optional="show" />
<field name="credit_note" />
<field
name="state"
decoration-success="state == 'close'"
decoration-info="state == 'draft'"
widget="badge"
optional="show"
/>
<field name="message_needaction" invisible="1" />
</tree>
</field>
</record>
<record id="hr_payslip_run_view_kanban" model="ir.ui.view">
<field name="name">hr.payslip.run.kanban</field>
<field name="model">hr.payslip.run</field>
<field name="arch" type="xml">
<kanban class="o_kanban_mobile">
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_content oe_kanban_global_click">
<div class="row">
<div class="col-6">
<strong>
<field name="name" />
</strong>
</div>
<div class="col-6">
<span class="float-right badge badge-secondary">
<field name="state" />
</span>
</div>
<div class="col-12">
<span>
<field name="date_start" />
-
<field name="date_end" />
</span>
<span
class="float-right"
title="Is a Blocking Reason?"
>
<field name="credit_note" widget="boolean" />
</span>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="hr_payslip_run_view_form" model="ir.ui.view">
<field name="name">hr.payslip.run.form</field>
<field name="model">hr.payslip.run</field>
<field name="arch" type="xml">
<form string="Payslips Batches">
<header>
<button
name="close_payslip_run"
type="object"
string="Close"
states="draft"
class="oe_highlight"
/>
<button
name="%(action_hr_payslip_by_employees)d"
type="action"
states="draft"
string="Generate Payslips"
class="oe_highlight"
/>
<button
string="Set to Draft"
name="draft_payslip_run"
type="object"
states="close"
/>
<field name="state" widget="statusbar" />
</header>
<sheet>
<label for="name" class="oe_edit_only" />
<h1>
<field name="name" />
</h1>
<group col="4">
<label for="date_start" string="Period" />
<div>
<field
name="date_start"
widget="daterange"
class="oe_inline"
options="{'related_end_date': 'date_end'}"
/>
-
<field
name="date_end"
widget="daterange"
class="oe_inline"
options="{'related_start_date': 'date_start'}"
/>
</div>
<field name="credit_note" />
<field name="struct_id" />
</group>
<separator string="Payslips" />
<field name="slip_ids" />
</sheet>
</form>
</field>
</record>
<record id="hr_payslip_run_action" model="ir.actions.act_window">
<field name="name">Payslips Batches</field>
<field name="res_model">hr.payslip.run</field>
<field name="view_mode">tree,kanban,form</field>
<field name="search_view_id" ref="hr_payslip_run_view_search" />
</record>
<menuitem
action="hr_payslip_run_action"
id="hr_payslip_run_menu"
parent="payroll_menu_root"
/>
</odoo>

View file

@ -0,0 +1,438 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="hr_payslip_view_tree" model="ir.ui.view">
<field name="name">hr.payslip.tree</field>
<field name="model">hr.payslip</field>
<field name="arch" type="xml">
<tree
decoration-muted="state == 'cancel'"
string="Payslips"
multi_edit="1"
sample="1"
>
<field name="number" readonly="1" decoration-bf="1" />
<field name="employee_id" readonly="1" />
<field name="name" />
<field name="date_from" optional="show" decoration-bf="1" />
<field name="date_to" optional="show" decoration-bf="1" />
<field name="activity_ids" widget="list_activity" optional="show" />
<field
name="state"
decoration-success="state == 'done'"
decoration-warning="state == 'verify'"
decoration-info="state == 'draft'"
decoration-danger="state == 'cancel'"
widget="badge"
optional="show"
/>
<field
name="company_id"
groups="base.group_multi_company"
options="{'no_create': True}"
/>
<field name="payslip_run_id" invisible="1" />
<field name="message_needaction" invisible="1" />
</tree>
</field>
</record>
<record id="hr_payslip_view_kanban" model="ir.ui.view">
<field name="name">hr.payslip.kanban</field>
<field name="model">hr.payslip</field>
<field name="arch" type="xml">
<kanban class="o_kanban_mobile">
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_content oe_kanban_global_click">
<div class="row">
<div class="col-6">
<strong>
<field name="employee_id" />
</strong>
</div>
<div class="col-6">
<span class="float-right badge badge-secondary">
<field name="state" />
</span>
</div>
<div class="col-12">
<span>
<field name="date_from" />
-
<field name="date_to" />
</span>
</div>
<div class="col-12">
<span>
<field name="name" />
</span>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="hr_payslip_view_form" model="ir.ui.view">
<field name="name">hr.payslip.form</field>
<field name="model">hr.payslip</field>
<field name="arch" type="xml">
<form string="Payslip">
<header>
<field name="allow_cancel_payslips" invisible="1" />
<button
string="Confirm"
name="action_payslip_done"
type="object"
states="verify"
class="oe_highlight"
/>
<button
string="Refund"
name="refund_sheet"
states="done"
type='object'
/>
<button
string="Compute Sheet"
name="compute_sheet"
type="object"
states="draft,verify"
class="oe_highlight"
/>
<button
string="Set to Draft"
name="action_payslip_draft"
type="object"
states="cancel,verify"
/>
<button
string="Cancel Payslip"
name="action_payslip_cancel"
type="object"
states="draft,verify"
/>
<button
string="Cancel Payslip"
name="action_payslip_cancel"
type="object"
attrs="{'invisible': ['|', ('state', '!=', 'done'), ('allow_cancel_payslips', '=', False)]}"
/>
<button
string="Refetch Payslip Data"
name="onchange_employee"
type="object"
states="draft,verify"
/>
<field
name="state"
widget="statusbar"
statusbar_visible="draft,verify,done,cancel"
/>
</header>
<sheet>
<div class="oe_button_box" name="button_box">
<button
name="%(hr_payslip_line_action_computation_details)d"
class="oe_stat_button"
icon="fa-money"
type="action"
>
<field
name="payslip_count"
widget="statinfo"
string="Payslip Lines"
help="Payslip Computation Details"
/>
</button>
</div>
<div class="oe_title">
<label for="employee_id" class="oe_edit_only" />
<h1>
<field name="employee_id" placeholder="Employee" />
</h1>
</div>
<group col="4">
<label for="date_from" string="Period" />
<div>
<field
name="date_from"
widget="daterange"
class="oe_inline"
options="{'related_end_date': 'date_to'}"
/>
-
<field
name="date_to"
widget="daterange"
class="oe_inline"
options="{'related_start_date': 'date_from'}"
/>
</div>
<!--
<field
name="contract_id"
domain="[('employee_id','=',employee_id),('date_start','&lt;=',date_to),'|',('date_end','&gt;=',date_from),('date_end','=',False)]"
context="{'default_employee_id': employee_id}"
/>
-->
<field name="number" />
<!--
<field
name="struct_id"
attrs="{'required':[('contract_id','!=',False)]}"
/>
-->
<field name="name" />
<field name="credit_note" />
<field
name="refunded_id"
attrs="{'invisible': [('refunded_id', '=', False)]}"
/>
<field
name="compute_date"
attrs="{'invisible':[('compute_date','==',False)]}"
/>
</group>
<notebook>
<page name="input" string="Worked Days &amp; Inputs">
<separator name="worked" string="Worked Days" />
<field name="worked_days_line_ids">
<tree string="Worked Days" editable="bottom">
<field name="name" />
<field name="code" />
<field name="number_of_days" />
<field name="number_of_hours" />
<field
name="contract_id"
domain="[('employee_id','=',parent.employee_id),('date_start','&lt;=',parent.date_to),'|',('date_end','&gt;=',parent.date_from),('date_end','=',False)]"
context="{'default_employee_id': parent.employee_id}"
/>
<field name="sequence" invisible="True" />
</tree>
<form string="Worked Day">
<group col="4">
<field name="name" />
<field name="code" />
<field name="sequence" />
<field name="number_of_days" />
<field name="number_of_hours" />
<field name="contract_id" />
</group>
</form>
</field>
<separator name="other" string="Other Inputs" />
<field name="input_line_ids" colspan="4" nolabel="1">
<tree string="Input Data" editable="bottom">
<field name="name" />
<field name="code" />
<field name="amount_qty" />
<field name="amount" />
<field
name="contract_id"
domain="[('employee_id','=',parent.employee_id),('date_start','&lt;=',parent.date_to),'|',('date_end','&gt;=',parent.date_from),('date_end','=',False)]"
context="{'default_employee_id': parent.employee_id}"
/>
<field name="sequence" invisible="True" />
</tree>
<form string="Payslip Line">
<group col="4">
<field name="name" />
<field name="code" />
<field name="sequence" />
<field name="amount" />
<field name="contract_id" />
</group>
</form>
</field>
</page>
<page name="computation" string="Salary Computation">
<group>
<field
name="hide_child_lines"
widget="boolean_toggle"
/>
</group>
<field
name="dynamic_filtered_payslip_lines"
colspan="4"
nolabel="1"
>
<tree
string="Salary Structure"
decoration-info="total == 0"
decoration-bf="parent_rule_id == False"
decoration-it="parent_rule_id != False"
decoration-muted="parent_rule_id != False"
create="false"
delete="false"
>
<field name="sequence" invisible="1" />
<field name="parent_line_id" invisible="1" />
<field name="parent_rule_id" invisible="1" />
<field name="code" readonly="1" />
<field
name="salary_rule_id"
readonly="1"
invisible="1"
/>
<field name="category_id" readonly="1" />
<field name="name" />
<field name="quantity" readonly="1" />
<field name="rate" readonly="1" />
<field name="amount" readonly="1" />
<field
name="total"
decoration-danger="0 > total and parent_rule_id == False"
decoration-success="total > 0 and parent_rule_id == False"
readonly="1"
/>
<field name="contract_id" readonly="1" />
</tree>
</field>
</page>
<page name="details" string="Salary rules apearing on payslip">
<field name="details_by_salary_rule_category">
<tree
string="Payslip Lines"
decoration-info="total == 0"
>
<field name="category_id" decoration-bf="1" />
<field name="code" widget="badge" />
<field name="name" />
<field
name="total"
decoration-bf="1"
decoration-danger="0 > total"
decoration-success="total > 0"
/>
</tree>
</field>
</page>
<page name="accounting" string="Accounting Information">
<group>
<group string="Miscellaneous">
<field
name="company_id"
groups="base.group_multi_company"
/>
<field
name="payslip_run_id"
domain="[('state','=','draft')]"
/>
</group>
<group name="accounting" string="Accounting">
<field name="paid" readonly="1" />
</group>
</group>
<div colspan="4">
<field
name="note"
placeholder="Add an internal note..."
/>
</div>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" />
<field name="activity_ids" />
<field name="message_ids" />
</div>
</form>
</field>
</record>
<record id="hr_payslip_view_search" model="ir.ui.view">
<field name="name">hr.payslip.select</field>
<field name="model">hr.payslip</field>
<field name="arch" type="xml">
<search string="Search Payslips">
<field name="employee_id" />
<field
name="name"
string="Payslips"
filter_domain="['|',('name','ilike',self),('number','ilike',self)]"
/>
<field name="date_from" />
<!--
<field name="contract_id" />
-->
<field name="payslip_run_id" />
<filter
string="Draft"
name="draft"
domain="[('state', '=', 'draft')]"
/>
<filter
string="Pending Review"
name="verify"
domain="[('state', '=', 'verify')]"
/>
<filter
string="Done"
name="done"
domain="[('state','=','done')]"
help="Done Slip"
/>
<separator />
<filter
string="Date"
name="date_filter"
date="date_to"
default_period="last_month"
/>
<separator />
<filter
string="Refunded"
name="credit_note"
domain="[('credit_note', '=', True)]"
/>
<separator />
<group expand="0" string="Group By">
<filter
string="Employees"
name="employee_id"
context="{'group_by':'employee_id'}"
/>
<filter
string="PaySlip Batch"
name="payslip_run_id"
context="{'group_by':'payslip_run_id'}"
/>
<filter
string="Companies"
name="company_id"
groups="base.group_multi_company"
context="{'group_by':'company_id'}"
/>
<filter
string="States"
name="state"
context="{'group_by':'state'}"
/>
</group>
</search>
</field>
</record>
<record id="hr_payslip_action" model="ir.actions.act_window">
<field name="name">Employee Payslips</field>
<field name="res_model">hr.payslip</field>
<field name="view_mode">tree,kanban,form</field>
<field name="search_view_id" ref="hr_payslip_view_search" />
</record>
<record id="hr_payslip_action_employee" model="ir.actions.act_window">
<field name="res_model">hr.payslip</field>
<field name="name">Payslips</field>
<field name="view_mode">tree,form</field>
<field name="context">
{'search_default_employee_id': [active_id], 'default_employee_id':
active_id}
</field>
</record>
<menuitem
id="hr_payslip_menu"
action="hr_payslip_action"
parent="payroll_menu_root"
groups="payroll.group_payroll_user"
/>
</odoo>

View file

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="hr_rule_parameter_view_form" model="ir.ui.view">
<field name="name">hr.rule.parameter.form</field>
<field name="model">hr.rule.parameter</field>
<field name="arch" type="xml">
<form string="Salary Rule Parameter">
<group>
<field name="name" required="True" />
<field name="code" />
<field
name="company_id"
invisible="1"
groups="base.group_multi_company"
options="{'no_create': True}"
/>
</group>
<group string="Versions">
</group>
<field name="parameter_version_ids"
nolabel="1"
context="{'default_rule_parameter_id': active_id}"
>
<tree editable="bottom">
<field name="date_from" />
<field name="parameter_value" />
</tree>
</field>
<field name="description" placeholder="Description" />
</form>
</field>
</record>
<record id="hr_rule_parameter_view_tree" model="ir.ui.view">
<field name="name">hr.rule.parameter.tree</field>
<field name="model">hr.rule.parameter</field>
<field name="arch" type="xml">
<tree>
<field name="code" widget="badge" />
<field name="name" />
<field name="parameter_version_ids" />
<field
name="company_id"
groups="base.group_multi_company"
options="{'no_create': True}"
class="oe_inline"
/>
</tree>
</field>
</record>
<record id="hr_rule_parameter_view_search" model="ir.ui.view">
<field name="name">hr.rule.parameter.search</field>
<field name="model">hr.rule.parameter</field>
<field name="arch" type="xml">
<search>
<!--
<field
name="name"
filter_domain="['|', ('name', 'ilike', self), ('code', 'ilike', self)]"
/>
-->
<field
name="name"
/>
<field name="company_id" groups="base.group_multi_company" />
</search>
</field>
</record>
<record id="hr_rule_parameter_action" model="ir.actions.act_window">
<field name="name">Salary Rule Parameters</field>
<field name="res_model">hr.rule.parameter</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem
id="menu_action_hr_salary_rule_parameter"
action="hr_rule_parameter_action"
name="Rule Parameters"
parent="payroll_menu_configuration"
sequence="35"
/>
</odoo>

View file

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="hr_salary_rule_category_view_form" model="ir.ui.view">
<field name="name">hr.salary.rule.category.form</field>
<field name="model">hr.salary.rule.category</field>
<field name="arch" type="xml">
<form string="Salary Categories">
<group col="4">
<field name="name" />
<field name="code" />
<field name="parent_id" />
</group>
<group string="Notes">
<field name="note" nolabel="1" />
</group>
</form>
</field>
</record>
<record id="hr_salary_rule_category_view_tree" model="ir.ui.view">
<field name="name">hr.salary.rule.category.tree</field>
<field name="model">hr.salary.rule.category</field>
<field name="arch" type="xml">
<tree string="Salary Rule Categories">
<field name="name" />
<field name="code" />
<field name="parent_id" invisible="1" />
</tree>
</field>
</record>
<record id="hr_salary_rule_category_view_search" model="ir.ui.view">
<field name="name">hr.salary.rule.category.select</field>
<field name="model">hr.salary.rule.category</field>
<field name="arch" type="xml">
<search string="Salary Rule Categories">
<field
name="name"
string="Salary Rule Categories"
filter_domain="['|',('name','ilike',self),('code','ilike',self)]"
/>
</search>
</field>
</record>
<record id="hr_salary_rule_category_action" model="ir.actions.act_window">
<field name="name">Salary Rule Categories</field>
<field name="res_model">hr.salary.rule.category</field>
<field name="view_id" ref="hr_salary_rule_category_view_tree" />
<field name="search_view_id" ref="hr_salary_rule_category_view_search" />
</record>
<menuitem
id="menu_hr_salary_rule_category"
action="hr_salary_rule_category_action"
parent="payroll_menu_configuration"
sequence="11"
groups="base.group_no_one"
/>
</odoo>

View file

@ -0,0 +1,346 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="hr_salary_rule_view_tree_children" model="ir.ui.view">
<field name="name">hr.salary.rule.list</field>
<field name="model">hr.salary.rule</field>
<field name="arch" type="xml">
<tree string="Salary Rules">
<field name="name" />
<field name="code" decoration-bf="1" />
<field name="category_id" widget="badge" />
<field name="sequence" invisible="1" />
<field name="register_id" />
</tree>
</field>
</record>
<record id="hr_salary_rule_view_kanban" model="ir.ui.view">
<field name="name">hr.salary.rule.kanban</field>
<field name="model">hr.salary.rule</field>
<field name="arch" type="xml">
<kanban class="o_kanban_mobile">
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_content oe_kanban_global_click">
<div class="row">
<div class="col-8">
<strong>
<field name="name" />
</strong>
</div>
<div class="col-4">
<span class="float-right">
<field name="category_id" widget="badge" />
</span>
</div>
</div>
<div class="row">
<div class="col-12">
<span>
Code:
<field name="code" />
</span>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="hr_salary_rule_view_tree" model="ir.ui.view">
<field name="name">hr.salary.rule.tree</field>
<field name="model">hr.salary.rule</field>
<field name="field_parent">child_ids</field>
<field eval="20" name="priority" />
<field name="arch" type="xml">
<tree string="Salary Rules">
<field name="name" />
<field name="code" />
<field name="category_id" invisible="True" />
<field
name="company_id"
groups="base.group_multi_company"
options="{'no_create': True}"
/>
</tree>
</field>
</record>
<record id="hr_salary_rule_view_form" model="ir.ui.view">
<field name="name">hr.salary.rule.form</field>
<field name="model">hr.salary.rule</field>
<field name="arch" type="xml">
<form string="Salary Rules">
<group class="oe_edit_only">
<label for="name" />
<h1>
<field name="name" />
</h1>
<label for="category_id" />
<h2>
<field name="category_id" />
</h2>
</group>
<group name="principal">
<group>
<field name="code" />
<field name="sequence" />
<field
name="company_id"
options="{'no_create': True}"
groups="base.group_multi_company"
/>
</group>
<group>
<field name="active" />
<field name="appears_on_payslip" />
</group>
</group>
<notebook>
<page string="General">
<group>
<group string="Conditions" name="conditions">
<field name="condition_select" />
<field
name="condition_python"
attrs="{'invisible':[('condition_select','!=','python')], 'required': [('condition_select','=','python')]}"
colspan="4"
widget="ace"
options="{'mode': 'python'}"
id="condition_python"
/>
<field
name="condition_range"
attrs="{'invisible':[('condition_select','!=','range')], 'required':[('condition_select','=','range')]}"
/>
<label
string="Condition Range"
attrs="{'invisible':[('condition_select','!=','range')], 'required':[('condition_select','=','range')]}"
for="condition_range_min"
/>
<div
attrs="{'invisible':[('condition_select','!=','range')], 'required':[('condition_select','=','range')]}"
>
<strong>Between </strong>
<field
name="condition_range_min"
class="oe_inline"
attrs="{'invisible':[('condition_select','!=','range')], 'required':[('condition_select','=','range')]}"
/>
<strong> and </strong>
<field
name="condition_range_max"
class="oe_inline"
attrs="{'invisible':[('condition_select','!=','range')], 'required':[('condition_select','=','range')]}"
/>
</div>
<separator string="Company Contribution" />
<field name="register_id" />
</group>
<group string="Computation" name="computation">
<field name="amount_select" />
<field
name="amount_percentage_base"
attrs="{'invisible':[('amount_select','!=','percentage')], 'required': [('amount_select','=','percentage')]}"
/>
<field
name="quantity"
attrs="{'invisible':[('amount_select','=','code')], 'required':[('amount_select','!=','code')]}"
/>
<field
name="amount_fix"
attrs="{'invisible':[('amount_select','!=','fix')], 'required':[('amount_select','=','fix')]}"
/>
<field
colspan="4"
name="amount_python_compute"
attrs="{'invisible':[('amount_select','!=','code')], 'required':[('amount_select','=','code')]}"
widget="ace"
options="{'mode': 'python'}"
id="amount_python_compute"
/>
<field
name="amount_percentage"
attrs="{'invisible':[('amount_select','!=','percentage')], 'required':[('amount_select','=','percentage')]}"
/>
</group>
<separator string="Notes" />
<field
name="note"
placeholder="Write salary rule notes or observations here..."
/>
</group>
</page>
<page name="rules" string="Child Rules">
<div class="alert alert-info" role="alert">
<p>
Child rule functionality is useful when you need other rules to be computed before the parent one. <br
/>
This means that all salary rules declared as childs (parent of one rule) will be added to the computation
if its parent rule is included in the salary structure. So child rules will only be computed if it's parent is
computed. <br />
This functionality is useful for doing auxiliar calculations that are used as dependencies for the parent
salary rule (e.x. rules required for complex tax computation that needs data from several modules).
</p>
</div>
<field name="parent_rule_id" />
<separator string="Children Definition" />
<field name="child_ids" />
</page>
<page name="inputs" string="Inputs">
<field name="input_ids" mode="tree">
<tree string="Input Data" editable="bottom">
<field name="code" />
<field name="name" />
</tree>
</field>
</page>
<!-- hernad copy paste from OCA payroll -->
<page name="help" string="Help">
<div style="margin-top: 4px;">
<h3>Salary Rules formula definition (Python)</h3>
<p>
In python definition in salary rules, you can write any code like you will do
in python. Any methematical operation or python function is supported.
</p>
<p>
The following objects and variables are available to you to use it in salary rules calculations.
</p>
<ul>
<li>
<code
>payslip:</code> contains current payslip object data (hr.payslip)
</li>
<li>
<code
>payslips:</code> contains payslips data (Payslips - Browsable Object)
</li>
<li>
<code
>employee:</code> contains current employee object data (hr.employee)
</li>
<li>
<code
>contract:</code> contains current contract object data (hr.contract)
</li>
<li>
<code
>rules:</code> contains the rules code (previusly computed)
</li>
<li>
<code
>categories:</code> contains the sum of amount of all rules belonging to that category
</li>
<li>
<code
>worked_days:</code> contains the computed worked days data
</li>
<li>
<code
>inputs:</code> contains the computed input data
</li>
<li>
<code
>payroll:</code> contains miscellaneous values related to payroll
</li>
<li>
<code
>current_contract:</code> contains values related/calculated for current contract
</li>
<li>
<code
>result_rules:</code> contains the values of previusly computed lines (qty, rate, amount, total)
</li>
<li>
<code
>tools:</code> contains tools and libraries which help with mathematical operations
</li>
</ul>
<p>
The calculations should be performed using the objects and variables below.
Then, you have to use specific compute variables which will store the data
for salary rule computation.
</p>
<ul>
<li>
<code
>result:</code> the returned value should be in this variable. It matches with "amount" column.
</li>
<li>
<code
>result_rate:</code> the rate that should be applied to "result"
</li>
<li>
<code
>result_qty:</code> the quantity of units that will be multiplied to "result"
</li>
<li>
<code
>result_name:</code> overrides the current name of the rule and allows to make dynamic names
</li>
</ul>
<h3>Examples</h3>
<ul>
<li>
<code>result = contract.wage * 0.10</code>
</li>
<li>
<code>
result = contract.wage
result_qty = worked_days.WORK100.number_of_days
</code>
</li>
<li>
<code>
result = contract.wage
result_rate = 10.0
</code>
</li>
</ul>
</div>
</page>
</notebook>
</form>
</field>
</record>
<record id="hr_salary_rule_view_search" model="ir.ui.view">
<field name="name">hr.salary.rule.select</field>
<field name="model">hr.salary.rule</field>
<field name="arch" type="xml">
<search string="Search Salary Rule">
<field
name="name"
string="Salary Rules"
filter_domain="['|',('name','ilike',self),('code','ilike',self)]"
/>
<field name="category_id" />
<field name="condition_range_min" />
<group col="8" colspan="4" expand="0" string="Group By">
<filter
string="Category"
name="head"
context="{'group_by':'category_id'}"
/>
</group>
</search>
</field>
</record>
<record id="action_salary_rule_form" model="ir.actions.act_window">
<field name="name">Salary Rules</field>
<field name="res_model">hr.salary.rule</field>
<field name="view_mode">tree,kanban,form</field>
<field name="domain">[('parent_rule_id','=',False)]</field>
<field name="search_view_id" ref="hr_salary_rule_view_search" />
</record>
<menuitem
id="menu_action_hr_salary_rule_form"
action="action_salary_rule_form"
parent="payroll_menu_configuration"
sequence="12"
/>
<record id="act_children_salary_rules" model="ir.actions.act_window">
<field name="name">All Children Rules</field>
<field name="res_model">hr.salary.rule</field>
<field name="domain">[('parent_rule_id', '=', active_id)]</field>
<field name="view_id" ref="hr_salary_rule_view_tree_children" />
</record>
</odoo>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!-- Root Menus -->
<menuitem
id="payroll_menu_root"
name="Payroll"
sequence="45"
web_icon="payroll,static/description/icon.png"
/>
<menuitem
id="payroll_menu_configuration"
name="Configuration"
parent="payroll_menu_root"
sequence="100"
groups="payroll.group_payroll_manager"
/>
</odoo>

View file

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template id="report_contributionregister">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="web.internal_layout">
<div class="page">
<h2>PaySlip Lines by Contribution Register</h2>
<div class="row mt32 mb32">
<div class="col-3">
<strong>Register Name:</strong>
<p t-field="o.name" />
</div>
<div class="col-3">
<strong>Date From:</strong>
<p t-esc="data['form']['date_from']" />
</div>
<div class="col-3">
<strong>Date To:</strong>
<p t-esc="data['form']['date_to']" />
</div>
</div>
<table class="table table-sm">
<thead>
<tr>
<th>PaySlip Name</th>
<th>Code</th>
<th>Name</th>
<th>Quantity/Rate</th>
<th>Amount</th>
<th>Total</th>
</tr>
</thead>
<tbody>
<tr t-foreach="lines_data.get(o.id, []).filtered(lambda line: line.quantity != 0)" t-as="line">
<td>
<span t-esc="line.slip_id.name" />
</td>
<td>
<span t-esc="line.code" />
</td>
<td>
<span t-esc="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==100.00 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-esc-options='{"widget": "monetary", "display_currency": o.company_id.currency_id}'
/>
</td>
<td class="text-end">
<span
t-esc="line.total"
t-esc-options='{"widget": "monetary", "display_currency": o.company_id.currency_id}'
/>
</td>
</tr>
</tbody>
</table>
<div class="row justify-content-end">
<div class="col-4">
<table class="table table-sm">
<tr class="border-black">
<td>
<strong>Total</strong>
</td>
<td class="text-end">
<span
t-esc="lines_total.get(o.id)"
t-esc-options='{"widget": "monetary", "display_currency": o.company_id.currency_id}'
/>
</td>
</tr>
</table>
</div>
</div>
</div>
</t>
</t>
</t>
</template>
</odoo>

View 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>

View file

@ -0,0 +1,171 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template id="report_payslipdetails">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="web.internal_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>Designation</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>
<h3>Details by Salary Rule Category</h3>
<table class="table table-sm mb32">
<thead>
<tr>
<th>Code</th>
<th>Salary Rule Category</th>
<th>Total</th>
</tr>
</thead>
<tbody>
<tr
t-foreach="get_details_by_rule_category.get(o.id, [])"
t-as="h"
>
<t t-if="h['level']>0">
<t t-set="style" t-value="'font-size:small;padding-left:15px;'" />
<t t-set="tstyle" t-value="'background-color:white;'" />
</t>
<t t-if="h['level']==0">
<t t-set="style" t-value="'font-weight:bold;'" />
<t t-set="tstyle" t-value="'background-color:lightgray;'" />
</t>
<td t-att-style="tstyle">
<span t-att-style="style" t-esc="h['code']" />
</td>
<td t-att-style="tstyle">
<span t-att-style="style" t-esc="'..'*h['level']" />
<span t-att-style="style" t-esc="h['rule_category']" />
</td>
<td class="text-end" t-att-style="tstyle">
<span
t-att-style="style"
t-esc="round(h['total'],2)"
t-esc-options='{"widget": "monetary", "display_currency": o.company_id.currency_id}'
/>
</td>
</tr>
</tbody>
</table>
<h3>Payslip Lines by Contribution Register</h3>
<table class="table table-sm mt32">
<thead>
<tr>
<th>Code</th>
<th>Name</th>
<th>Quantity/rate</th>
<th>Amount</th>
<th>Total</th>
</tr>
</thead>
<tbody>
<tr
t-foreach="get_lines_by_contribution_register.get(o.id, [])"
t-as="p"
>
<t t-if="(p.get('name',''))[0:3]=='==='">
<t t-set="style" t-value="'background-color:lightgray;'" />
</t>
<t t-if="(p.get('name',''))[0:3]!='==='">
<t t-set="style" t-value="'background-color:white;'" />
</t>
<td t-att-style="style">
<span t-esc="p.get('code', '')" />
</td>
<td t-att-style="style">
<span t-esc="p.get('name', '')" />
</td>
<td class="text-end" t-att-style="style">
<span t-esc="show_rate_or_quantity(p.get('rate', 0), p.get('quantity', 0))" />
</td>
<td class="text-end" t-att-style="style">
<span t-esc="p.get('amount',0) if p.get('amount',0) != 0 else ''" />
</td>
<td class="text-end" t-att-style="style">
<span
t-esc="p.get('total', 0)"
t-esc-options='{"widget": "monetary", "display_currency": o.company_id.currency_id}'
/>
</td>
</tr>
</tbody>
</table>
<p class="text-end">
<strong>Authorized signature</strong>
</p>
</div>
</t>
</t>
</t>
</template>
</odoo>

View file

@ -0,0 +1,91 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="open_payroll_modules" model="ir.actions.act_window">
<field name="name">Payroll</field>
<field name="res_model">ir.module.module</field>
<field name="view_mode">kanban,tree,form</field>
<field
name="context"
eval="{'search_default_category_id': ref('base.module_category_payroll_localization'), 'search_default_name': 'Payroll'}"
/>
<field name="search_view_id" ref="base.view_module_filter" />
</record>
<record id="res_config_settings_view_form" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.hr.payroll</field>
<field name="model">res.config.settings</field>
<field name="priority" eval="45" />
<field name="inherit_id" ref="base.res_config_settings_view_form" />
<field name="arch" type="xml">
<xpath expr="//div[hasclass('settings')]" position="inside">
<div
class="app_settings_block"
data-string="Payroll"
string="Payroll"
data-key="payroll"
groups="payroll.group_payroll_manager"
>
<h2>Accounting</h2>
<div class="row mt16 o_settings_container" id="payroll_accountant">
<div class="col-lg-6 col-12 o_setting_box">
<div class="o_setting_left_pane">
<field name="module_payroll_account" />
</div>
<div class="o_setting_right_pane">
<label
for="module_payroll_account"
string="Payroll Entries"
/>
<div class="text-muted">
Post payroll slips in accounting
</div>
</div>
</div>
</div>
<h2>Misc Functionalities</h2>
<div class="row mt16 o_settings_container" id="worked_days">
<div class="col-lg-6 col-12 o_setting_box">
<div class="o_setting_left_pane">
<field name="leaves_positive" />
</div>
<div class="o_setting_right_pane">
<label for="leaves_positive" />
<div class="text-muted">
Display non-negative values for leaves in payslip worked days lines.
</div>
</div>
</div>
</div>
<div class="row mt16 o_settings_container" id="worked_days">
<div class="col-lg-6 col-12 o_setting_box">
<div class="o_setting_left_pane">
<field name="allow_cancel_payslips" />
</div>
<div class="o_setting_right_pane">
<label for="allow_cancel_payslips" />
<div class="text-muted">
If enabled, confirmed payslips can be canceled by the user. Default: Not enabled.
</div>
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
<record id="payroll_configuration_action" model="ir.actions.act_window">
<field name="name">Settings</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">res.config.settings</field>
<field name="view_mode">form</field>
<field name="target">inline</field>
<field name="context">{'module' : 'payroll'}</field>
</record>
<menuitem
id="menu_payroll_global_settings"
name="Settings"
parent="payroll_menu_configuration"
sequence="0"
action="payroll_configuration_action"
groups="base.group_system"
/>
</odoo>