Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.0][MIG] hr_payroll_period: migrate to 18.0 #184

Draft
wants to merge 12 commits into
base: 18.0
Choose a base branch
from
Draft
160 changes: 160 additions & 0 deletions hr_payroll_period/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
=================
HR Payroll Period
=================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:f945b44927a810367557b02abc26b2d5099f9fcf12877221187aae164ce89cf8
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpayroll-lightgray.png?logo=github
:target: https://github.com/OCA/payroll/tree/18.0/hr_payroll_period
:alt: OCA/payroll
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/payroll-18-0/payroll-18-0-hr_payroll_period
: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=18.0
:alt: Try me on Runboat

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

Adds the concept of period in the human resources management.

The objective of the module is to create periods of time to be used in
the human resources management flows such as specific payroll period of
time or timesheet periods.

Regarding to payrolls, it adds the date of payment on the payslip and
payslip batch. This date is automatically filled when selecting a
period. It also adds a sequence on the payslip batch name and the
company on the payslip batch.

**Table of contents**

.. contents::
:local:

Installation
============

Install the payroll of your localization, then install this module.

Configuration
=============

Create a fiscal year
--------------------

Go to: Payroll -> Configuration -> Payroll Fiscal Year

- Select a type of schedule, e.g. monthly
- Select a duration, e.g. from 2015-01-01 to 2015-12-31
- Select when the payment is done, e.g. the second day of the next
period
- Click on create periods, then confirm

The first period of the year is now open and ready to be used.

Some companies have employees paid at different types of schedule. In
that case, you need to create as many fiscal years as types of schedule
required. The same applies in a multi-company configuration.

Usage
=====

Create a payslip batch
----------------------

Go to: Human Resources -> Payroll -> Payslip Batches

The first period of the fiscal year is already selected. You may change
it if you manage multiple types of schedules.

- Click on Generate Payslips

The employees paid with the selected schedule are automatically
selected.

- Click on Generate
- Confirm your payslips
- Click on Close

The payroll period is closed automatically and the next one is open.

Known issues / Roadmap
======================

1. Currently it is not possible to close the HR fiscal year before the
end of the end of the last period. When implementing this feature,
contracts and opened payslips should be updated with the new period
assigned.
2. It is not possible to use the date_range module in server tools to
generate semi-monthly periods so those periods are generated as in
previous versions.
3. The date_range module does not allow to create a period for just one
day.

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:%20hr_payroll_period%0Aversion:%2018.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
-------

* Savoir-faire Linux

Contributors
------------

- David Dufresne <[email protected]>
- Maxime Chambreuil <[email protected]>
- Pierre Lamarche <[email protected]>
- Salton Massally <[email protected]>
- Guewen Baconnier <[email protected]>
- Jordi Ballester Alomar <[email protected]>
- Serpent Consulting Services Pvt. Ltd. <[email protected]>
- Aaron Henriquez <[email protected]>

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-nimarosa| image:: https://github.com/nimarosa.png?size=40px
:target: https://github.com/nimarosa
:alt: nimarosa

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

|maintainer-nimarosa|

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

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions hr_payroll_period/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models
33 changes: 33 additions & 0 deletions hr_payroll_period/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright 2015 Savoir-faire Linux. All Rights Reserved.
# Copyright 2017 Serpent Consulting Services Pvt. Ltd.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "HR Payroll Period",
"version": "18.0.1.0.0",
"license": "AGPL-3",
"category": "Payroll",
"summary": "Add payroll periods",
"author": "Savoir-faire Linux, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/payroll",
"depends": [
"payroll",
"date_range",
],
"data": [
"security/ir.model.access.csv",
"security/hr_period_security.xml",
"data/ir_sequence_data.xml",
"data/date_range_type.xml",
"data/ir_cron.xml",
"views/menus.xml",
"views/date_range_type_view.xml",
"views/hr_period_view.xml",
"views/hr_fiscalyear_view.xml",
"views/hr_payslip_view.xml",
"views/hr_payslip_run_view.xml",
"views/hr_payslip_employee_view.xml",
],
"installable": True,
"maintainers": ["nimarosa"],
}
16 changes: 16 additions & 0 deletions hr_payroll_period/data/date_range_type.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2017 ACSONE SA/NV
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo noupdate="1">
<record model="date.range.type" id="date_range_hr_fiscal_year">
<field name="name">HR Fiscal Year</field>
<field name="allow_overlap" eval="False" />
<field name="hr_fiscal_year" eval="True" />
</record>

<record model="date.range.type" id="date_range_hr_period">
<field name="name">HR Period</field>
<field name="allow_overlap" eval="False" />
<field name="hr_period" eval="True" />
</record>
</odoo>
11 changes: 11 additions & 0 deletions hr_payroll_period/data/ir_cron.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<odoo noupdate="1">
<record id="ir_cron_hr_payroll_period" model="ir.cron">
<field name="name">Create Next Fiscal Year</field>
<field name="model_id" ref="model_hr_fiscalyear" />
<field name="state">code</field>
<field name="code">model.cron_create_next_fiscal_year()</field>
<field name="interval_number">1</field>
<field name="interval_type">months</field>
<field name="active" eval="False" />
</record>
</odoo>
9 changes: 9 additions & 0 deletions hr_payroll_period/data/ir_sequence_data.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_payslip_run" model="ir.sequence">
<field name="name">Payslip Batch</field>
<field name="code">hr.payslip.run</field>
<field name="padding" eval="5" />
<field name="prefix">PAY</field>
</record>
</odoo>
Loading
Loading