From 996c6b07e54b27679f3c121f1c34eb69146c7a8d Mon Sep 17 00:00:00 2001 From: Michael Telahun Date: Thu, 10 Nov 2022 16:43:10 +0300 Subject: [PATCH] [MIG] payroll: Migration to 15.0 --- payroll/README.rst | 48 +---- payroll/__manifest__.py | 2 +- payroll/data/hr_payroll_data.xml | 22 ++- payroll/data/hr_payroll_sequence.xml | 16 +- payroll/demo/hr_payroll_demo.xml | 1 - payroll/models/__init__.py | 1 + payroll/models/hr_employee.py | 1 - payroll/models/hr_leave_type.py | 10 ++ payroll/models/hr_payslip.py | 22 +-- payroll/models/hr_payslip_line.py | 1 - payroll/models/hr_payslip_run.py | 1 - payroll/models/hr_salary_rule.py | 54 +++--- payroll/readme/HISTORY.rst | 34 ---- payroll/security/hr_payroll_security.xml | 168 +++++++++--------- payroll/static/description/index.html | 81 ++------- payroll/tests/common.py | 7 + payroll/tests/test_hr_payroll_cancel.py | 21 ++- payroll/tests/test_hr_payslip_change_state.py | 5 +- payroll/tests/test_hr_payslip_worked_days.py | 2 +- payroll/tests/test_hr_salary_rule.py | 6 +- payroll/tests/test_payslip_flow.py | 22 +-- payroll/views/hr_contract_views.xml | 6 +- .../views/hr_contribution_register_views.xml | 2 +- payroll/views/hr_payroll_structure_views.xml | 4 +- payroll/views/hr_payslip_line_views.xml | 7 +- payroll/views/hr_payslip_run_views.xml | 1 - payroll/views/hr_payslip_views.xml | 12 +- .../views/hr_salary_rule_category_views.xml | 2 +- payroll/views/hr_salary_rule_views.xml | 6 +- ...hr_payroll_contribution_register_report.py | 5 +- payroll/wizard/hr_payslip_change_state.py | 20 ++- 31 files changed, 235 insertions(+), 355 deletions(-) create mode 100644 payroll/models/hr_leave_type.py delete mode 100644 payroll/readme/HISTORY.rst diff --git a/payroll/README.rst b/payroll/README.rst index 6fecebc75..db7d93635 100644 --- a/payroll/README.rst +++ b/payroll/README.rst @@ -14,13 +14,13 @@ Payroll :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/14.0/payroll + :target: https://github.com/OCA/payroll/tree/15.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-14-0/payroll-14-0-payroll + :target: https://translation.odoo-community.org/projects/payroll-15-0/payroll-15-0-payroll :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/281/14.0 + :target: https://runbot.odoo-community.org/runbot/281/15.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -34,51 +34,13 @@ This module is a backport from Odoo SA and as such, it is not included in the OC .. contents:: :local: -Changelog -========= - -14.0.6.0.0 (2022-11-04) -~~~~~~~~~~~~~~~~~~~~~~~ - -* #87 payroll_rule_time_parameter: remove from payroll -* Removed hr.rule.parameter & hr.rule.parameter.value (see payroll_rule_time_parameter) - -14.0.5.3.0 (2022-09-13) -~~~~~~~~~~~~~~~~~~~~~~~ - -* #67 Merge payslip_cancel and payslip_change_state in base module -* Merged hr_payroll_cancel, adding a setting to enable this feature (by default disabled). -* Merged hr_payroll_change_state (there is no setting to disable this feature). - -14.0.5.0.0 (2022-08-29) -~~~~~~~~~~~~~~~~~~~~~~~ - -* #60 Improve views, add child functionalities, allow compute of name - -14.0.4.0.0 (2022-08-17) -~~~~~~~~~~~~~~~~~~~~~~~ - -* #45 Remove contract_advantage_template model and new module -* Removed hr.contract.advantage.template (moved to payroll_contract_advantages) - -14.0.3.0.0 (2022-08-15) -~~~~~~~~~~~~~~~~~~~~~~~ - -* #47 payslip refactoring - -14.0.2.0.0 (2022-07-07) -~~~~~~~~~~~~~~~~~~~~~~~ - -* #31 major-rule-parameters-function -* Added hr.rule.parameter & hr.rule.parameter.value - Bug Tracker =========== Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -123,6 +85,6 @@ Current `maintainers `__: |maintainer-appstogrow| |maintainer-nimarosa| -This module is part of the `OCA/payroll `_ project on GitHub. +This module is part of the `OCA/payroll `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/payroll/__manifest__.py b/payroll/__manifest__.py index 6bac28c03..656abf626 100644 --- a/payroll/__manifest__.py +++ b/payroll/__manifest__.py @@ -2,7 +2,7 @@ { "name": "Payroll", - "version": "14.0.6.1.0", + "version": "15.0.1.0.0", "category": "Payroll", "website": "https://github.com/OCA/payroll", "sequence": 38, diff --git a/payroll/data/hr_payroll_data.xml b/payroll/data/hr_payroll_data.xml index c3adfdd08..1984a0266 100644 --- a/payroll/data/hr_payroll_data.xml +++ b/payroll/data/hr_payroll_data.xml @@ -1,14 +1,12 @@ - - - - - Payroll - 2 - - - Payroll Rate - 4 - - + + + + Payroll + 2 + + + Payroll Rate + 4 + diff --git a/payroll/data/hr_payroll_sequence.xml b/payroll/data/hr_payroll_sequence.xml index b0e75db8e..ae5e10e30 100644 --- a/payroll/data/hr_payroll_sequence.xml +++ b/payroll/data/hr_payroll_sequence.xml @@ -1,11 +1,9 @@ - - - - Salary Slip - salary.slip - SLIP/ - 3 - - + + + Salary Slip + salary.slip + SLIP/ + 3 + diff --git a/payroll/demo/hr_payroll_demo.xml b/payroll/demo/hr_payroll_demo.xml index 4e987a1ab..a5cdc8878 100644 --- a/payroll/demo/hr_payroll_demo.xml +++ b/payroll/demo/hr_payroll_demo.xml @@ -192,7 +192,6 @@ ref('hr_salary_rule_convanceallowance1'),ref('hr_salary_rule_professionaltax1'), Roger Scott - Building 1, Second Floor +3282823500 - - - - Payroll - Manage employee payroll - 16 - - - Officer - - - - - Manager - - - - - - - - - Officer and subordinates Payslip - - - ['|','|', ('employee_id.user_id', '=', user.id), - ('employee_id.department_id', '=', False), - ('employee_id.department_id.manager_id.user_id', '=', user.id)] - - - - - All Payslip - - [(1,'=',1)] - - - - - Payslip: multi-company - - - - ['|', ('company_id', '=', False), ('company_id', 'in', company_ids)] - - - - Payroll Structure: multi-company - - - - ['|', ('company_id', '=', False), ('company_id', 'in', company_ids)] - - - - Salary Rule: multi-company - - - - ['|', ('company_id', '=', False), ('company_id', 'in', company_ids)] - - - - Salary Rule Category: multi-company - - - - ['|', ('company_id', '=', False), ('company_id', 'in', company_ids)] - - - - Contribution Register: multi-company - - - - ['|', ('company_id', '=', False), ('company_id', 'in', company_ids)] - - - + + + Payroll + Manage employee payroll + 16 + + + Officer + + + + + Manager + + + + + + + + + Officer and subordinates Payslip + + + ['|','|', ('employee_id.user_id', '=', user.id), + ('employee_id.department_id', '=', False), + ('employee_id.department_id.manager_id.user_id', '=', user.id)] + + + + + All Payslip + + [(1,'=',1)] + + + + + Payslip: multi-company + + + + ['|', ('company_id', '=', False), ('company_id', 'in', company_ids)] + + + + Payroll Structure: multi-company + + + + ['|', ('company_id', '=', False), ('company_id', 'in', company_ids)] + + + + Salary Rule: multi-company + + + + ['|', ('company_id', '=', False), ('company_id', 'in', company_ids)] + + + + Salary Rule Category: multi-company + + + + ['|', ('company_id', '=', False), ('company_id', 'in', company_ids)] + + + + Contribution Register: multi-company + + + + ['|', ('company_id', '=', False), ('company_id', 'in', company_ids)] + + diff --git a/payroll/static/description/index.html b/payroll/static/description/index.html index 8676094a8..3522ccd89 100644 --- a/payroll/static/description/index.html +++ b/payroll/static/description/index.html @@ -3,7 +3,7 @@ - + Payroll