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

Add l10n_ch_hr_payroll. #66

Merged
merged 8 commits into from
Dec 17, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,9 @@ l10n_ch_scan_bvr
----------------

Allows you to scan the ESR/BVR references and automatically create the proper supplier invoices

l10n_ch_hr_payroll
------------------

Provide Swizerland Payroll Rules.
Allow to specify a LPP range to contract and 2 kinds of children to employee.
31 changes: 31 additions & 0 deletions l10n_ch_hr_payroll/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Swizerland Payroll Rules.
=========================

**Features list :**
* Add Swiss salary rule categories
* Add Swiss salary rules
* Add children in school to employee
* Add LPP range to contract

**For functionnal information:**
http://ur1.ca/ir5ou
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm concerned about this link, this is french only documentation.
The README.rst deserve at least a better english explaination for our neightbour beyond the Röstigraben.


**Author :**
Open Net Sàrl -Industrie 59 1030 Bussigny Suisse - http://www.open-net.ch

**Contact :**
[email protected]

**History :**

V1.0.0: 2014-11-07/Sge
* Add Salary rule categories
* Add Salary rules
* Add Employee children in school
* Add Contract LPP rate

V1.0.1: 2014-11-11/Sge
* Set the 'LPP rate'' digits to 'Payroll Rate' decimal accuracy

V1.0.2:
* Add some minor changes, based on pull request #66 comments.
30 changes: 30 additions & 0 deletions l10n_ch_hr_payroll/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# -*- coding: utf-8 -*-
#
# File: __init__.py
# Module: l10n_ch_hr_payroll
#
# Created by [email protected]
#
# Copyright (c) 2014-TODAY Open-Net Ltd. <http://www.open-net.ch>
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################

from . import hr_contract
from . import hr_employee
47 changes: 47 additions & 0 deletions l10n_ch_hr_payroll/__openerp__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# -*- coding: utf-8 -*-
#
# File: __openerp__.py
# Module: l10n_ch_hr_payroll
#
# Created by [email protected]
#
# Copyright (c) 2014-TODAY Open-Net Ltd. <http://www.open-net.ch>
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################

{
'name': 'Switzerland - Payroll',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can add a 'summary' in __openerp__.py to say in a short sentence what does this module. It will be displayed in module list and on apps.odoo.com

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's done.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

'summary': 'Swizerland Payroll Rules',
'category': 'Localization',
'author': 'Open-Net Sàrl',
'depends': ['decimal_precision', 'hr_payroll', 'hr_payroll_account'],
'version': '1.0.1',
'auto_install': False,
'demo': [],
'website': 'http://open-net.ch',
'data': [
'hr_contract_view.xml',
'hr_employee_view.xml',
'l10n_ch_hr_payroll_data.xml',
'data/hr.salary.rule-change.csv',
'data/hr.salary.rule-new.csv',
],
'installable': True
}
4 changes: 4 additions & 0 deletions l10n_ch_hr_payroll/data/hr.salary.rule-change.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.id,amount_select,appears_on_payslip,code,condition_select,note,amount_fix,condition_range_max,condition_range_min,name,amount_percentage,amount_percentage_base,amount_python_compute,condition_python,quantity,condition_range,sequence,category_id,parent_rule_id
1,Python Code,True,BASIC,Always True,,,,,Basic,,,result = contract.wage, # Available variables: #---------------------- # payslip: object containing the payslips # employee: hr.employee object # contract: hr.contract object # rules: object containing the rules code (previously computed) # categories: object containing the computed salary rule categories (sum of amount of all rules belonging to that category). # worked_days: object containing the computed worked days # inputs: object containing the computed inputs # Note: returned value have to be set in the variable 'result' result = rules.NET > categories.NET * 0.10,1,contract.wage,1,Basic,
2,Python Code,True,GROSS,Always True,,,,,Gross,,,result = categories.BASIC + categories.ALW + categories.FALW, # Available variables: #---------------------- # payslip: object containing the payslips # employee: hr.employee object # contract: hr.contract object # rules: object containing the rules code (previously computed) # categories: object containing the computed salary rule categories (sum of amount of all rules belonging to that category). # worked_days: object containing the computed worked days # inputs: object containing the computed inputs # Note: returned value have to be set in the variable 'result' result = rules.NET > categories.NET * 0.10,1,contract.wage,100,Gross,
3,Python Code,True,NET,Always True,,,,,Net,,,result = categories.BASIC + categories.ALW + categories.FALW + categories.DED, # Available variables: #---------------------- # payslip: object containing the payslips # employee: hr.employee object # contract: hr.contract object # rules: object containing the rules code (previously computed) # categories: object containing the computed salary rule categories (sum of amount of all rules belonging to that category). # worked_days: object containing the computed worked days # inputs: object containing the computed inputs # Note: returned value have to be set in the variable 'result' result = rules.NET > categories.NET * 0.10,1,contract.wage,200,Net,
Loading