Skip to content

Commit

Permalink
Merge pull request #66 from open-net-sarl/8.0
Browse files Browse the repository at this point in the history
Add l10n_ch_hr_payroll.
  • Loading branch information
jgrandguillaume committed Dec 17, 2014
2 parents 96ab73b + 4f25f8b commit 2af9826
Show file tree
Hide file tree
Showing 12 changed files with 316 additions and 0 deletions.
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

**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',
'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

0 comments on commit 2af9826

Please sign in to comment.