Initial commit: OCA Payroll packages (5 packages)

This commit is contained in:
Ernad Husremovic 2025-08-29 15:43:05 +02:00
commit d19274f581
407 changed files with 214057 additions and 0 deletions

View file

@ -0,0 +1,16 @@
<?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="schedule_pay" />
<field name="struct_id" required="1" />
<field name="company_id" groups="base.group_multi_company" />
<field name="currency_id" invisible="1" />
</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>
<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,13 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="hr_leave_type_view_form" model="ir.ui.view">
<field name="name">hr.leave.type.view.form.payroll</field>
<field name="model">hr.leave.type</field>
<field name="inherit_id" ref="hr_holidays.edit_holiday_status_form" />
<field name="arch" type="xml">
<xpath expr="//field[@name='time_type']" position="after">
<field name="code" />
</xpath>
</field>
</record>
</odoo>

View file

@ -0,0 +1,125 @@
<?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>
<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>
<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">
<sheet>
<field name="require_code" invisible="1" />
<group col="2">
<field name="name" />
<field
name="code"
attrs="{'required': [('require_code','=',True)]}"
/>
<field name="parent_id" />
<field
name="company_id"
groups="base.group_multi_company"
options="{'no_create': True}"
/>
</group>
<notebook>
<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>
</sheet>
</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,74 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="hr_payslip_input_view_search" model="ir.ui.view">
<field name="name">hr.payslip.input.search</field>
<field name="model">hr.payslip.input</field>
<field name="arch" type="xml">
<search>
<field
string="Search all"
name="name"
filter_domain="['|', '|', '|', ('name', 'ilike', self), ('payslip_id', 'ilike', self), ('code', 'ilike', self), ('contract_id', 'ilike', self)]"
/>
<field name="name" />
<field name="payslip_id" />
<field name="code" />
<field name="amount" />
<field name="contract_id" />
<group expand="1">
<filter
name="group_by_name"
domain="[]"
context="{'group_by':'name'}"
/>
<filter
name="group_by_payslip_id"
domain="[]"
context="{'group_by':'payslip_id'}"
/>
<filter
name="group_by_code"
domain="[]"
context="{'group_by':'code'}"
/>
<filter
name="group_by_contract_id"
domain="[]"
context="{'group_by':'contract_id'}"
/>
</group>
</search>
</field>
</record>
<record id="hr_payslip_input_view_tree" model="ir.ui.view">
<field name="name">hr.payslip.input.tree</field>
<field name="model">hr.payslip.input</field>
<field name="arch" type="xml">
<tree create="false" edit="true" multi_edit="1" editable="top">
<field name="name" />
<field name="payslip_id" />
<field name="sequence" />
<field name="code" />
<field name="amount" />
<field name="amount_qty" />
<field name="contract_id" />
</tree>
</field>
</record>
<record id="hr_payslip_input_action" model="ir.actions.act_window">
<field name="name">Payslip Inputs</field>
<field name="res_model">hr.payslip.input</field>
<field name="view_mode">tree</field>
<field name="search_view_id" ref="hr_payslip_input_view_search" />
</record>
<menuitem
action="hr_payslip_input_action"
id="hr_payslip_input_menu"
parent="payroll_menu_configuration"
sequence="13"
/>
</odoo>

View file

@ -0,0 +1,179 @@
<?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 editable="bottom" decoration-info="total == 0">
<field name="allow_edit_payslip_lines" invisible="1" />
<field name="category_id" />
<field name="employee_id" invisible="1" />
<field name="sequence" />
<field name="name" />
<field name="code" />
<field
name="quantity"
attrs="{'readonly': [('allow_edit_payslip_lines', '!=', True)]}"
/>
<field
name="rate"
attrs="{'readonly': [('allow_edit_payslip_lines', '!=', True)]}"
/>
<field
name="amount"
attrs="{'readonly': [('allow_edit_payslip_lines', '!=', True)]}"
/>
<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">
<sheet>
<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">
<field name="child_ids" readonly="1" nolabel="1">
<tree
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>
</page>
</notebook>
</sheet>
</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,180 @@
<?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="company_id" groups="base.group_multi_company" />
<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'"
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" />
<field
name="company_id"
groups="base.group_multi_company"
optional="show"
/>
</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" />
<field
name="company_id"
groups="base.group_multi_company"
/>
</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>
<group name="period_group">
<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="company_id"
groups="base.group_multi_company"
/>
</group>
<group name="other">
<field name="struct_id" />
<field name="credit_note" />
</group>
</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,416 @@
<?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'" 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">
<h1>
<field name="name" />
</h1>
</div>
<group col="4">
<field name="employee_id" />
<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 editable="bottom">
<field name="name" />
<field name="code" />
<field name="number_of_days" string="Days" />
<field name="number_of_hours" string="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 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 name="controls">
<group>
<field
name="hide_child_lines"
widget="boolean_toggle"
/>
<field
name="hide_invisible_lines"
widget="boolean_toggle"
/>
</group>
</group>
<field
name="dynamic_filtered_payslip_lines"
colspan="4"
nolabel="1"
>
<tree
decoration-info="total == 0 and appears_on_payslip == True"
decoration-bf="parent_rule_id == False"
decoration-it="parent_rule_id != False"
decoration-muted="parent_rule_id != False or appears_on_payslip != True"
create="false"
delete="false"
>
<field name="appears_on_payslip" invisible="1" />
<field name="sequence" optional="hide" />
<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"
/>
</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,83 @@
<?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">
<field name="require_code" invisible="1" />
<sheet>
<label for="name" class="oe_edit_only" />
<h1>
<field name="name" />
</h1>
<group>
<group>
<field
name="code"
attrs="{'required': [('require_code','=',True)]}"
/>
<field name="parent_id" />
</group>
</group>
<notebook>
<page string="Salary Rules">
<separator string="Associated Salary Rules" />
<field name="salary_rules_ids" nolabel="1" create="false">
<tree>
<field name="code" decoration-bf="1" />
<field name="name" />
</tree>
</field>
</page>
</notebook>
<group string="Notes">
<field
colspan="2"
name="note"
placeholder="Add your notes or category explanation here..."
nolabel="1"
/>
</group>
</sheet>
</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>
<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,376 @@
<?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>
<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>
<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">
<field name="require_code_and_category" invisible="1" />
<div
class="alert alert-info oe_edit_only"
role="alert"
attrs="{'invisible':[('amount_select','!=','code')]}"
>
<p>
If you have doubts about coding salary rules, check the "Help" tab in this form.
</p>
</div>
<sheet>
<label for="name" class="oe_edit_only" />
<h1>
<field name="name" />
</h1>
<label for="category_id" class="oe_edit_only" />
<h2>
<field
name="category_id"
attrs="{'required': [('require_code_and_category','=',True)]}"
/>
</h2>
<group name="principal">
<group>
<field
name="code"
attrs="{'required': [('require_code_and_category','=',True)]}"
/>
<field name="sequence" />
<field name="register_id" />
<field
name="company_id"
options="{'no_create': True}"
groups="base.group_multi_company"
/>
</group>
<group>
<field name="active" widget="boolean_toggle" />
<field name="appears_on_payslip" widget="boolean_toggle" />
</group>
</group>
<notebook>
<page string="Rule Configuration">
<separator string="Notes" />
<field
name="note"
placeholder="Write salary rule notes or observations here..."
/>
<group>
<group string="Conditions" name="conditions">
<field
name="condition_select"
widget="selection_badge"
decoration-info="1"
decoration-bf="1"
nolabel="1"
colspan="2"
/>
<field
name="condition_python"
attrs="{'invisible':[('condition_select','!=','python')], 'required': [('condition_select','=','python')]}"
colspan="2"
widget="ace"
options="{'mode': 'python'}"
id="condition_python"
nolabel="1"
/>
<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>
</group>
<group string="Computation" name="computation">
<field
name="amount_select"
widget="selection_badge"
decoration-info="1"
decoration-bf="1"
nolabel="1"
colspan="2"
/>
<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="2"
name="amount_python_compute"
attrs="{'invisible':[('amount_select','!=','code')], 'required':[('amount_select','=','code')]}"
widget="ace"
options="{'mode': 'python'}"
id="amount_python_compute"
nolabel="1"
/>
<field
name="amount_percentage"
attrs="{'invisible':[('amount_select','!=','percentage')], 'required':[('amount_select','=','percentage')]}"
/>
</group>
</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 editable="bottom">
<field name="code" />
<field name="name" />
</tree>
</field>
</page>
<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>
</sheet>
</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.external_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, [])" 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>
<span t-esc="line.quantity" />
</td>
<td class="text-right">
<span
t-esc="line.amount"
t-options='{"widget": "monetary", "display_currency": o.company_id.currency_id}'
/>
</td>
<td class="text-right">
<span
t-esc="line.total"
t-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-right">
<span
t-esc="lines_total.get(o.id)"
t-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,127 @@
<?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>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>
<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)"
t-as="line"
>
<td>
<span t-field="line.code" />
</td>
<td>
<span t-field="line.name" />
</td>
<td>
<span t-field="line.quantity" />
</td>
<td>
<span
t-esc="line.amount"
t-options='{"widget": "monetary", "display_currency": o.company_id.currency_id}'
/>
</td>
<td>
<span
t-esc="line.total"
t-options='{"widget": "monetary", "display_currency": o.company_id.currency_id}'
/>
</td>
</tr>
</tbody>
</table>
<p class="text-right">
<strong>Authorized signature</strong>
</p>
</div>
</t>
</t>
</t>
</template>
</odoo>

View file

@ -0,0 +1,154 @@
<?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.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>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"
>
<td>
<span t-esc="h['code']" />
</td>
<td>
<span t-esc="'..'*h['level']" />
<span t-esc="h['rule_category']" />
</td>
<td class="text-right">
<span
t-esc="h['total']"
t-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"
>
<td>
<span t-esc="p.get('code', '')" />
</td>
<td>
<span t-esc="p.get('name', '')" />
</td>
<td>
<span t-esc="p.get('quantity', '')" />
</td>
<td>
<span t-esc="p.get('amount', 0)" />
</td>
<td class="text-right">
<span
t-esc="p.get('total', 0)"
t-options='{"widget": "monetary", "display_currency": o.company_id.currency_id}'
/>
</td>
</tr>
</tbody>
</table>
<p class="text-right">
<strong>Authorized signature</strong>
</p>
</div>
</t>
</t>
</t>
</template>
</odoo>

View file

@ -0,0 +1,143 @@
<?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 payslips in accounting
</div>
</div>
</div>
</div>
<h2>Calculation Settings</h2>
<div class="row mt16 o_settings_container" id="leaves_positive">
<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">
In payslip worked days, leave days/hours have positive values
</div>
</div>
</div>
</div>
<div
class="row mt16 o_settings_container"
id="allow_cancel_payslips"
>
<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">
Allow users to cancel confirmed payslips
</div>
</div>
</div>
</div>
<div
class="row mt16 o_settings_container"
id="prevent_compute_on_confirm"
>
<div class="col-lg-6 col-12 o_setting_box">
<div class="o_setting_left_pane">
<field name="prevent_compute_on_confirm" />
</div>
<div class="o_setting_right_pane">
<label for="prevent_compute_on_confirm" />
<div class="text-muted">
Prevent payslips from being recomputed when confirming them
</div>
</div>
</div>
</div>
<div
class="row mt16 o_settings_container"
id="allow_edit_payslip_lines"
>
<div class="col-lg-6 col-12 o_setting_box">
<div class="o_setting_left_pane">
<field name="allow_edit_payslip_lines" />
</div>
<div class="o_setting_right_pane">
<label for="allow_edit_payslip_lines" />
<div class="text-muted">
Allow users to edit some payslip line fields manually
</div>
</div>
</div>
</div>
<div
class="row mt16 o_settings_container"
id="require_code_and_category"
>
<div class="col-lg-6 col-12 o_setting_box">
<div class="o_setting_left_pane">
<field name="require_code_and_category" />
</div>
<div class="o_setting_right_pane">
<label for="require_code_and_category" />
<div class="text-muted">
Require rule.code, rule.category, category.code, structure.code
</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>