Skip to content

Commit

Permalink
Merge PR #142 into 17.0
Browse files Browse the repository at this point in the history
Signed-off-by dreispt
  • Loading branch information
OCA-git-bot committed May 16, 2024
2 parents 0ba2123 + 8f5593a commit 8f8f86a
Show file tree
Hide file tree
Showing 144 changed files with 190,487 additions and 0 deletions.
93 changes: 93 additions & 0 deletions payroll/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
=======
Payroll
=======

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:def4f708faf4767d5767c515426c572391d63f2a30ffde152f86d3a019c0b920
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpayroll-lightgray.png?logo=github
:target: https://github.com/OCA/payroll/tree/17.0/payroll
:alt: OCA/payroll
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/payroll-17-0/payroll-17-0-payroll
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/payroll&target_branch=17.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

Manage your employee payroll records.

This module is a backport from Odoo SA and as such, it is not included in the OCA CLA. That means we do not have a copy of the copyright on it like all other OCA modules.

**Table of contents**

.. contents::
:local:

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/payroll/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/payroll/issues/new?body=module:%20payroll%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Odoo SA

Contributors
~~~~~~~~~~~~

* Odoo SA <[email protected]>
* David James <[email protected]>
* Hilar AK <[email protected]>
* Nimarosa (Nicolas Rodriguez) <[email protected]>
* Henrik Norlin (@appstogrow)

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-appstogrow| image:: https://github.com/appstogrow.png?size=40px
:target: https://github.com/appstogrow
:alt: appstogrow
.. |maintainer-nimarosa| image:: https://github.com/nimarosa.png?size=40px
:target: https://github.com/nimarosa
:alt: nimarosa

Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-appstogrow| |maintainer-nimarosa|

This module is part of the `OCA/payroll <https://github.com/OCA/payroll/tree/17.0/payroll>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
5 changes: 5 additions & 0 deletions payroll/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.

from . import models
from . import report
from . import wizard
45 changes: 45 additions & 0 deletions payroll/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.

{
"name": "Payroll",
"version": "17.0.1.0.0",
"category": "Payroll",
"website": "https://github.com/OCA/payroll",
"sequence": 38,
"summary": "Manage your employee payroll records",
"license": "LGPL-3",
"author": "Odoo SA, Odoo Community Association (OCA)",
"depends": [
"hr_contract",
"hr_holidays",
"mail",
],
"data": [
"security/hr_payroll_security.xml",
"security/ir.model.access.csv",
"data/hr_payroll_sequence.xml",
"data/hr_payroll_data.xml",
"wizard/hr_payroll_contribution_register_report_views.xml",
"wizard/hr_payroll_payslips_by_employees_views.xml",
"views/menus.xml",
"views/hr_contract_views.xml",
"views/hr_payroll_structure_views.xml",
"views/hr_salary_rule_category_views.xml",
"views/hr_contribution_register_views.xml",
"views/hr_salary_rule_views.xml",
"views/hr_payslip_line_views.xml",
"views/hr_payslip_views.xml",
"views/hr_payslip_run_views.xml",
"views/hr_employee_views.xml",
"views/report_contributionregister.xml",
"views/report_payslip.xml",
"views/report_payslipdetails.xml",
"report/report.xml",
"views/res_config_settings_views.xml",
"wizard/hr_payroll_send_email.xml",
"wizard/hr_payslip_change_state_view.xml",
],
"demo": ["demo/hr_payroll_demo.xml"],
"application": True,
"maintainers": ["appstogrow", "nimarosa"],
}
12 changes: 12 additions & 0 deletions payroll/data/hr_payroll_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<!-- Decimal Precision -->
<record forcecreate="True" id="decimal_payroll" model="decimal.precision">
<field name="name">Payroll</field>
<field name="digits">2</field>
</record>
<record forcecreate="True" id="decimal_payroll_rate" model="decimal.precision">
<field name="name">Payroll Rate</field>
<field name="digits">4</field>
</record>
</odoo>
9 changes: 9 additions & 0 deletions payroll/data/hr_payroll_sequence.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<record id="seq_salary_slip" model="ir.sequence">
<field name="name">Salary Slip</field>
<field name="code">salary.slip</field>
<field name="prefix">SLIP/</field>
<field name="padding">3</field>
</record>
</odoo>
221 changes: 221 additions & 0 deletions payroll/demo/hr_payroll_demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,221 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="contrib_register_employees" model="hr.contribution.register">
<field name="name">Employees</field>
<field name="partner_id" eval="False" />
</record>
<record id="BASIC" model="hr.salary.rule.category">
<field name="name">Basic</field>
<field name="code">BASIC</field>
</record>
<record id="ALW" model="hr.salary.rule.category">
<field name="name">Allowance</field>
<field name="code">ALW</field>
</record>
<record id="GROSS" model="hr.salary.rule.category">
<field name="name">Gross</field>
<field name="code">GROSS</field>
</record>
<record id="DED" model="hr.salary.rule.category">
<field name="name">Deduction</field>
<field name="code">DED</field>
</record>
<record id="NET" model="hr.salary.rule.category">
<field name="name">Net</field>
<field name="code">NET</field>
</record>
<record id="COMP" model="hr.salary.rule.category">
<field name="name">Company Contribution</field>
<field name="code">COMP</field>
</record>
<record id="hr_rule_basic" model="hr.salary.rule">
<field name="name">Basic Salary</field>
<field name="sequence" eval="1" />
<field name="code">BASIC</field>
<field name="category_id" ref="payroll.BASIC" />
<field name="condition_select">none</field>
<field name="amount_select">code</field>
<field name="amount_python_compute">
result = contract.wage
</field>
</record>
<record id="hr_rule_taxable" model="hr.salary.rule">
<field name="name">Gross</field>
<field name="sequence" eval="100" />
<field name="code">GROSS</field>
<field name="category_id" ref="payroll.GROSS" />
<field name="condition_select">none</field>
<field name="amount_select">code</field>
<field name="amount_python_compute">
result = categories.BASIC + categories.ALW
</field>
</record>
<record id="hr_rule_net" model="hr.salary.rule">
<field name="name">Net Salary</field>
<field name="sequence" eval="200" />
<field name="code">NET</field>
<field name="category_id" ref="payroll.NET" />
<field name="condition_select">none</field>
<field name="amount_select">code</field>
<field name="amount_python_compute">
result = categories.BASIC + categories.ALW + categories.DED
</field>
<field name="register_id" ref="contrib_register_employees" />
</record>
<!-- Salary Structure -->
<record id="structure_base" model="hr.payroll.structure">
<field name="code">BASE</field>
<field name="name">Base for new structures</field>
<field
eval="[(6, 0, [ref('hr_rule_basic'), ref('hr_rule_taxable'),ref('hr_rule_net')])]"
name="rule_ids"
/>
<field name="company_id" ref="base.main_company" />
</record>
<!-- Contribution Register -->
<record id="hr_houserent_register" model="hr.contribution.register">
<field name="name">House Rent Allowance Register</field>
</record>
<record id="hr_provident_fund_register" model="hr.contribution.register">
<field name="name">Provident Fund Register</field>
</record>
<record id="hr_professional_tax_register" model="hr.contribution.register">
<field name="name">Professional Tax Register</field>
</record>
<record id="hr_meal_voucher_register" model="hr.contribution.register">
<field name="name">Meal Voucher Register</field>
</record>
<!-- Salary Rules -->
<record id="hr_salary_rule_houserentallowance1" model="hr.salary.rule">
<field name="amount_select">percentage</field>
<field eval="40.0" name="amount_percentage" />
<field name="amount_percentage_base">contract.wage</field>
<field name="code">HRA</field>
<field name="category_id" ref="payroll.ALW" />
<field name="register_id" ref="hr_houserent_register" />
<field name="name">House Rent Allowance</field>
<field name="sequence" eval="5" />
</record>
<record id="hr_salary_rule_convanceallowance1" model="hr.salary.rule">
<field name="amount_select">fix</field>
<field eval="800.0" name="amount_fix" />
<field name="code">CA</field>
<field name="category_id" ref="payroll.ALW" />
<field name="name">Conveyance Allowance</field>
<field name="sequence" eval="10" />
</record>
<record id="hr_salary_rule_professionaltax1" model="hr.salary.rule">
<field name="amount_select">fix</field>
<field eval="150" name="sequence" />
<field eval="-200.0" name="amount_fix" />
<field name="code">PT</field>
<field name="category_id" ref="payroll.DED" />
<field name="register_id" ref="hr_professional_tax_register" />
<field name="name">Professional Tax</field>
</record>
<record id="hr_salary_rule_providentfund1" model="hr.salary.rule">
<field name="amount_select">percentage</field>
<field eval="120" name="sequence" />
<field eval="-12.5" name="amount_percentage" />
<field name="amount_percentage_base">contract.wage</field>
<field name="code">PF</field>
<field name="category_id" ref="payroll.DED" />
<field name="register_id" ref="hr_provident_fund_register" />
<field name="name">Provident Fund</field>
</record>
<record id="hr_salary_rule_ca_demo" model="hr.salary.rule">
<field name="amount_select">fix</field>
<field eval="600.0" name="amount_fix" />
<field name="code">CAMD</field>
<field name="category_id" ref="payroll.ALW" />
<field name="name">Conveyance Allowance For Marc Demo</field>
<field name="sequence" eval="15" />
</record>
<record id="hr_salary_rule_meal_voucher" model="hr.salary.rule">
<field name="amount_select">fix</field>
<field eval="10" name="amount_fix" />
<field name="quantity">
worked_days.WORK100 and worked_days.WORK100.number_of_days
</field>
<field name="code">MA</field>
<field name="category_id" ref="payroll.ALW" />
<field name="register_id" ref="hr_meal_voucher_register" />
<field name="name">Meal Voucher</field>
<field name="sequence" eval="16" />
</record>
<record id="hr_salary_rule_sales_commission" model="hr.salary.rule">
<field name="amount_select">code</field>
<field name="code">SALE</field>
<field name="category_id" ref="payroll.ALW" />
<field name="name">Get 1% of sales</field>
<field name="sequence" eval="17" />
<field name="amount_python_compute">
result = ((inputs.SALEURO and inputs.SALEURO.amount) + (inputs.SALASIA and
inputs.SALASIA.amount)) * 0.01
</field>
</record>
<!-- Rule Inputs -->
<record id="hr_rule_input_sale_a" model="hr.rule.input">
<field name="code">SALEURO</field>
<field name="name">Sales to Europe</field>
<field name="input_id" ref="hr_salary_rule_sales_commission" />
</record>
<record id="hr_rule_input_sale_b" model="hr.rule.input">
<field name="code">SALASIA</field>
<field name="name">Sales to Asia</field>
<field name="input_id" ref="hr_salary_rule_sales_commission" />
</record>
<!-- Salary Structure -->
<record id="structure_001" model="hr.payroll.structure">
<field name="code">ME</field>
<field name="name">Marketing Executive</field>
<field
eval="[(6, 0, [ref('hr_salary_rule_houserentallowance1'),
ref('hr_salary_rule_convanceallowance1'),ref('hr_salary_rule_professionaltax1'),ref('hr_salary_rule_providentfund1')])]"
name="rule_ids"
/>
<field name="company_id" ref="base.main_company" />
<field name="parent_id" ref="structure_base" />
</record>
<record id="structure_002" model="hr.payroll.structure">
<field name="code">MEMD</field>
<field name="name">Marketing Executive for Marc Demo</field>
<field
eval="[(6, 0, [ref('hr_salary_rule_ca_demo'), ref('hr_salary_rule_meal_voucher')])]"
name="rule_ids"
/>
<field name="company_id" ref="base.main_company" />
<field name="parent_id" ref="structure_001" />
</record>
<!-- Employee -->
<record id="hr_employee_payroll" model="hr.employee">
<field name="company_id" ref="base.main_company" />
<field eval="1" name="active" />
<field name="name">Roger Scott</field>
<field name="work_phone">+3282823500</field>
<field
name="image_1920"
type="base64"
file="payroll/static/img/hr_employee_payroll-image.jpg"
/>
</record>
<!-- Employee Contract -->
<record id="hr_contract_firstcontract1" model="hr.contract">
<field name="name">Marketing Executive Contract</field>
<field name="date_start" eval="time.strftime('%Y-%m')+'-1'" />
<field name="date_end" eval="time.strftime('%Y')+'-12-31'" />
<field name="struct_id" ref="payroll.structure_001" />
<field name="employee_id" ref="hr_employee_payroll" />
<field name="notes">Default contract for marketing executives</field>
<field eval="4000.0" name="wage" />
</record>
<record id="hr_contract_marc_demo" model="hr.contract">
<field name="name">Contract For Marc Demo</field>
<field name="date_start" eval="time.strftime('%Y-%m')+'-1'" />
<field name="date_end" eval="time.strftime('%Y')+'-12-31'" />
<field name="struct_id" ref="payroll.structure_002" />
<field name="employee_id" ref="hr.employee_qdp" />
<field name="notes">This is Marc Demo's contract</field>
<field eval="5000.0" name="wage" />
</record>
</odoo>
Loading

0 comments on commit 8f8f86a

Please sign in to comment.