From c2ba3e41d3e5e36525fe3afceb6b6a4d334529f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Gendre?= Date: Wed, 26 Nov 2014 14:26:11 +0100 Subject: [PATCH] Add l10n_ch_hr_payroll. Add some minor changes, based on pull request #66 comments. Some changes in copyright Fix 2 pep8 errors. Fix error in big comment header. Remove description from l10n_ch_hr_payroll/__openerp__.py file. Add license key in __openerp__.py Add OCA as author of OCA addons In order to get visibility on https://www.odoo.com/apps the OCA board has decided to add the OCA as author of all the addons maintained as part of the association. Restarting 'l10n_ch_payroll' from a cleaner state Corrected: removed trailing blank line at the end of 'models/hr_contract.py' Restaured: the content of __openerp__.py, lots during the last git rebase. Corrected: the contributors lists and the link to the corresponding website page explaining the details. OCA Transbot updated translations from Transifex OCA Transbot updated translations from Transifex [UPD] prefix versions with 8.0 [MIG] Make modules uninstallable Module ported to v8 Modify AM_C category Change module name in __init__.py Fix README wrong module name Short header on __init__.py, hr_contract.py, hr_employee.py OCA Transbot updated translations from Transifex Add two more rules for family allocation - ALFA_E_R - ALFA_F_R Add missing view to __openerp__.py Fix version format Fix author name OCA Transbot updated translations from Transifex --- l10n_ch_hr_payroll/README.rst | 93 +++ l10n_ch_hr_payroll/__init__.py | 5 + l10n_ch_hr_payroll/__openerp__.py | 55 ++ .../data/hr.salary.rule.category.xml | 37 ++ l10n_ch_hr_payroll/data/hr.salary.rule.xml | 619 ++++++++++++++++++ l10n_ch_hr_payroll/i18n/en.po | 48 ++ l10n_ch_hr_payroll/i18n/it.po | 49 ++ l10n_ch_hr_payroll/i18n/nb_NO.po | 49 ++ .../8.0.1.0.8/pre-update-ir_model_data.py | 45 ++ l10n_ch_hr_payroll/models/__init__.py | 6 + l10n_ch_hr_payroll/models/hr_contract.py | 16 + l10n_ch_hr_payroll/models/hr_employee.py | 15 + .../static/description/icon.png | Bin 0 -> 1007 bytes l10n_ch_hr_payroll/views/hr_contract_view.xml | 27 + l10n_ch_hr_payroll/views/hr_employee_view.xml | 25 + 15 files changed, 1089 insertions(+) create mode 100644 l10n_ch_hr_payroll/README.rst create mode 100644 l10n_ch_hr_payroll/__init__.py create mode 100644 l10n_ch_hr_payroll/__openerp__.py create mode 100644 l10n_ch_hr_payroll/data/hr.salary.rule.category.xml create mode 100644 l10n_ch_hr_payroll/data/hr.salary.rule.xml create mode 100644 l10n_ch_hr_payroll/i18n/en.po create mode 100644 l10n_ch_hr_payroll/i18n/it.po create mode 100644 l10n_ch_hr_payroll/i18n/nb_NO.po create mode 100755 l10n_ch_hr_payroll/migrations/8.0.1.0.8/pre-update-ir_model_data.py create mode 100644 l10n_ch_hr_payroll/models/__init__.py create mode 100644 l10n_ch_hr_payroll/models/hr_contract.py create mode 100644 l10n_ch_hr_payroll/models/hr_employee.py create mode 100644 l10n_ch_hr_payroll/static/description/icon.png create mode 100644 l10n_ch_hr_payroll/views/hr_contract_view.xml create mode 100644 l10n_ch_hr_payroll/views/hr_employee_view.xml diff --git a/l10n_ch_hr_payroll/README.rst b/l10n_ch_hr_payroll/README.rst new file mode 100644 index 000000000..48d43ad13 --- /dev/null +++ b/l10n_ch_hr_payroll/README.rst @@ -0,0 +1,93 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :alt: License: AGPL-3 + +Switzerland Payroll Rules +========================= + +This module allows you to manage the salaries of your employees + +** Features list :** + * Add Swiss salary rule categories + * Add Swiss salary rules + * Add children in school to employee + * Add LPP range to contract + * Add LPP Amount to contract. + * Add Holiday Rate to contract. + +** For further information:** + * Payroll accounting: http://open-net.ch/blog/la-comptabilite-salariale-suisse-avec-odoo-1/tag/salaires-6 + +** Remarks: ** + * To prevent overwriting your salary rules changes, an update from 1.0.8 and lower to 1.0.9 and higher creates duplicates of the salary rules. This is because with some migrated databases, one may encounter a difficulty with the existing rules (they can not be erased if they are already used). The solution is then to force the existing ones to be non-updatable. And this is done using an included pre-migration script. + * As this module proposes its own report (same as the original, but with its own footer), don't forget to make it non-updatable. + * If you choose to uninstall this module, you have to manually delete the rules. + +Known issues / Roadmap +====================== + +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. + +V1.0.3-4: + * Add LPP Amount to contract. + * Add Worked Hours Rate to contract. + * Add Hourly Rate to contract. + * Compute the Wage of contract, based on Worked Hours and Hourly Rate. + * Add new salay rules + +V1.0.5: + * Add Holiday Rate to contract. + * Update "Indemnité vacances 8,33%" rule to include + "Holiday Rate" from contract. + +V1.0.6: + * Move salary rules from CSV file to XML file. + * Import salary rules only at install. + * Internal reorganization of files (.py and .xml). + +V1.0.7: + * Added: two new dependencies (hr_contract and hr_attendance) + +V1.0.8: + * Updated: the "Appears on slip" settings + * Integrated: report for the payslip, with its own footer + * Added: a pre-migration script + * pre-migration script correctly set + +V1.1: + * New: commissions and reimbursements management in pay slips and contracts + +V1.2: + * Journal entries generated by the confirmation of a payslip now inherits correctly of the partner's name +V1.3: + * Move commission and reimbursement management to hr_payroll_commission and hr_payroll_expense modules + +Contributors +------------ + +* Sebastien Gendre +* Yvon-Philippe Crittin + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +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. + +To contribute to this module, please visit http://odoo-community.org. diff --git a/l10n_ch_hr_payroll/__init__.py b/l10n_ch_hr_payroll/__init__.py new file mode 100644 index 000000000..17cad8307 --- /dev/null +++ b/l10n_ch_hr_payroll/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +# © 2012 David Coninckx (Opennet Sarl) +# License into __openerp__.py. + +from . import models diff --git a/l10n_ch_hr_payroll/__openerp__.py b/l10n_ch_hr_payroll/__openerp__.py new file mode 100644 index 000000000..c3c0ab080 --- /dev/null +++ b/l10n_ch_hr_payroll/__openerp__.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# +# File: __openerp__.py +# Module: l10n_ch_hr_payroll +# +# Created by sge@open-net.ch +# +# Copyright (c) 2014-TODAY Open-Net Ltd. +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-TODAY OpenERP S.A. +# +# 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 . +# +############################################################################## + + +{ + 'name': 'Switzerland - Payroll', + 'summary': 'Swizerland Payroll Rules', + 'category': 'Localization', + 'author': "Open Net Sàrl,Odoo Community Association (OCA)", + 'depends': [ + 'decimal_precision', + 'hr_payroll', + 'hr_payroll_account', + 'hr_contract', + 'hr_attendance', + 'account' + ], + 'version': '9.0.1.3.0', + 'auto_install': False, + 'demo': [], + 'website': 'http://open-net.ch', + 'license': 'AGPL-3', + 'data': [ + 'data/hr.salary.rule.category.xml', + 'data/hr.salary.rule.xml', + 'views/hr_employee_view.xml', + 'views/hr_contract_view.xml' + ], + 'installable': True +} diff --git a/l10n_ch_hr_payroll/data/hr.salary.rule.category.xml b/l10n_ch_hr_payroll/data/hr.salary.rule.category.xml new file mode 100644 index 000000000..67fd8dc80 --- /dev/null +++ b/l10n_ch_hr_payroll/data/hr.salary.rule.category.xml @@ -0,0 +1,37 @@ + + + + + + Free allowance + FALW + + + Full Company Contribution + COSTS + + + + Yearly provisions + P13 + + + + Monthly Extra hours + HSUP + + + + Monthly Bonus + BONUS + + + + diff --git a/l10n_ch_hr_payroll/data/hr.salary.rule.xml b/l10n_ch_hr_payroll/data/hr.salary.rule.xml new file mode 100644 index 000000000..4c59f7e14 --- /dev/null +++ b/l10n_ch_hr_payroll/data/hr.salary.rule.xml @@ -0,0 +1,619 @@ + + + + + + fix + False + AM + none + 999999 + Assurance Maternité GE + 1 + 110 + + + + percentage + True + AM_E + none + Assurance Maternité Employé GE + -0.0410 + categories.BASIC + categories.ALW + 1 + 111 + + + + + percentage + True + AM_C + none + Assurance Maternité Company GE + 0.0820 + categories.BASIC + categories.ALW + 1 + 111 + + + + + fix + False + AVS + none + 999999 + AVS/AI/APG + 1 + 110 + + + + percentage + True + AVS_E + none + 2047.4 + 999999 + AVS/AI/APG Employe + -5.15 + categories.BASIC + categories.ALW + 1 + 111 + + + + + percentage + False + AVS_C + none + 2047.4 + 999999 + AVS/AI/APG Company + 10.3 + categories.BASIC + categories.ALW + 1 + 111 + + + + + fix + False + AC + none + AC + 1 + 120 + + + + percentage + True + AC_E + range + 10500 + AC Employee + -1.1 + categories.BASIC + categories.ALW + 1 + categories.BASIC + categories.ALW + 121 + + + + + percentage + False + AC_C + range + 10500 + AC Company + 2.2 + categories.BASIC + categories.ALW + 1 + categories.BASIC + categories.ALW + 121 + + + + + percentage + True + AC_SE + range + 10500 + 999999 + AC Solidarite Employee + -1 + categories.BASIC + categories.ALW + 1 + categories.BASIC + categories.ALW + 122 + + + + + percentage + False + AC_SC + range + 10500 + 999999 + AC Solidarite Company + 2 + categories.BASIC + categories.ALW + 1 + categories.BASIC + categories.ALW + 122 + + + + + fix + False + LPP + range + 2047.5 + 7050 + LPP + categories.BASIC + categories.ALW + 1 + categories.BASIC + categories.ALW + 130 + + + + code + True + LPP_E + python + 2047.5 + 7050 + LPP Employe + categories.BASIC + categories.ALW + minimum_legal = 2047.50 ; result = (categories.BASIC + categories.ALW - minimum_legal) * (((contract.lpp_rate)*-1)/100) + result = contract.lpp_rate > 0 + 1 + 131 + + + + + code + False + LPP_C + python + 2047.5 + 7050 + LPP Company + categories.BASIC + categories.ALW + minimum_legal = 2047.50 ; result = (categories.BASIC + categories.ALW - minimum_legal) * 2*(contract.lpp_rate/100) + result = contract.lpp_rate > 0 + 1 + 132 + + + + + code + True + LPP_F_E + python + 2047.5 + 7050 + LPP Fixed amount Employe + result = -contract.lpp_amount + result = contract.lpp_amount > 0 + 1 + 133 + + + + + code + False + LPP_F_C + python + 2047.5 + 7050 + LPP Fixed amount Company + result = 2*contract.lpp_amount + result = contract.lpp_amount > 0 + 1 + 134 + + + + + fix + False + LAA + none + LAA + 1 + 140 + + + + percentage + True + LAA_E + none + LAA Employe + -0.46 + categories.BASIC + categories.ALW + 1 + 141 + + + + + percentage + False + LAA_C + none + LAA Company + 0.92 + categories.BASIC + categories.ALW + 1 + 141 + + + + + fix + False + LCA + none + LCA + 1 + 150 + + + + percentage + True + LCA_E + none + LCA Employe + -0.52 + categories.BASIC + categories.ALW + 1 + 151 + + + + + percentage + False + LCA_C + none + LCA Company + 1.04 + categories.BASIC + categories.ALW + 1 + 151 + + + + + fix + False + PCF + none + PC Famille VD + 1 + 160 + + + + percentage + True + PCF_E + none + PC Famille VD Employe + -0.06 + categories.BASIC + categories.ALW + 1 + 161 + + + + + percentage + False + PCF_C + none + PC Famille VD Company + 0.12 + categories.BASIC + categories.ALW + 1 + 161 + + + + + percentage + False + FADMIN + none + Frais administratifs + 0.25 + categories.BASIC + categories.ALW + 1 + 210 + + + + percentage + False + COTFAM + none + Cotisation Alloc. Fam. + 2.275 + categories.BASIC + categories.ALW + 1 + 211 + + + + fix + False + ALFA + none + Allocations familiales + 1 + categories.BASIC + categories.ALW + 50 + + + + code + True + ALFA_E + python + Allocations familiales versées - Enfants à l'école obligatoire + result = contract.employee_id.children * 230 +if contract.employee_id.children + contract.employee_id.children_student > 2: + result += contract.employee_id.children * 100 + result = contract.employee_id.children > 0 + 1 + contract.employee_id.children + 51 + + + + + code + True + ALFA_E_R + python + Allocations familiales versées - Enfants à l'école obligatoire (report) + result = contract.employee_id.children * 230 +if contract.employee_id.children + contract.employee_id.children_student > 2: + result += contract.employee_id.children * 100 +result = -result + result = contract.employee_id.children > 0 + 1 + contract.employee_id.children + 51 + + + + + code + True + ALFA_F + python + Allocations familiales versées - Enfants en formation + result = contract.employee_id.children_student * 300 +if contract.employee_id.children + contract.employee_id.children_student > 2: + result += contract.employee_id.children_student * 100 + result = contract.employee_id.children_student > 0 + 1 + contract.employee_id.children_student + 51 + + + + + code + True + ALFA_F_R + python + Allocations familiales versées - Enfants en formation (report) + result = contract.employee_id.children_student * 300 +if contract.employee_id.children + contract.employee_id.children_student > 2: + result += contract.employee_id.children_student * 100 +result = -result + result = contract.employee_id.children_student > 0 + 1 + contract.employee_id.children_student + 51 + + + + + percentage + True + FREP + none + Frais de représentation + 5 + categories.BASIC + 1 + 40 + + + + code + False + P13 + none + Provision 13ème + 1 + 250 + + + + code + False + P13_NET + none + 13ème NET + result = (categories.BASIC + categories.DED )/12 + 1 + 255 + + + + + code + False + P13_AVS + none + 13ème AVS + result = AVS_C/12 + 1 + 260 + + + + + code + False + P13_AC + none + 13ème AC + result = AC_C/12 + 1 + 265 + + + + + code + False + P13_LAA + none + 13ème LAA + result = LAA_C/12 + 1 + 280 + + + + + code + False + P13_LCA + none + 13ème LCA + result = LCA_C/12 + 1 + 285 + + + + + code + False + P13_LPP + none + 13ème LPP Based on RATE + result = LPP_C/12 + 1 + 270 + + + + + code + False + P13_PCF + none + 13ème PCF + result = PCF_C/12 + 1 + 290 + + + + + code + False + P13_FADMIN + none + 13ème FADMIN + result = FADMIN/12 + 1 + 295 + + + + + code + True + I_VAC + python + Indemnité vacances + result = (contract.wage * contract.holiday_rate) / 100 + result = contract.holiday_rate > 0 + 1 + 25 + + + + code + True + IMPS + none + Impôts à la source + -2.27 + categories.BASIC + categories.ALW + categories.FALW + 1 + 151 + + + + + + + code + True + GROSS + none + Gross + result = categories.BASIC + categories.ALW + categories.FALW + result = rules.NET > categories.NET * 0.10 + 1 + contract.wage + 100 + + + + code + True + NET + none + Net + result = categories.BASIC + categories.ALW + categories.FALW + categories.DED + result = rules.NET > categories.NET * 0.10 + 1 + contract.wage + 200 + + + + diff --git a/l10n_ch_hr_payroll/i18n/en.po b/l10n_ch_hr_payroll/i18n/en.po new file mode 100644 index 000000000..c92b24879 --- /dev/null +++ b/l10n_ch_hr_payroll/i18n/en.po @@ -0,0 +1,48 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_ch_hr_payroll +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: l10n-switzerland (9.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-03-16 01:38+0000\n" +"PO-Revision-Date: 2016-03-15 12:30+0000\n" +"Last-Translator: OCA Transbot \n" +"Language-Team: English (http://www.transifex.com/oca/OCA-l10n-switzerland-9-0/language/en/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: en\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: l10n_ch_hr_payroll +#: model:ir.model,name:l10n_ch_hr_payroll.model_hr_contract +msgid "Contract" +msgstr "Contract" + +#. module: l10n_ch_hr_payroll +#: model:ir.model,name:l10n_ch_hr_payroll.model_hr_employee +msgid "Employee" +msgstr "Employee" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_contract_holiday_rate +msgid "Holiday Rate" +msgstr "Holiday Rate" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_contract_lpp_amount +msgid "LPP Amount" +msgstr "LPP Amount" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_contract_lpp_rate +msgid "LPP Rate" +msgstr "LPP Rate" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_employee_children_student +msgid "Number of Children student" +msgstr "Number of Children student" diff --git a/l10n_ch_hr_payroll/i18n/it.po b/l10n_ch_hr_payroll/i18n/it.po new file mode 100644 index 000000000..df1b5334e --- /dev/null +++ b/l10n_ch_hr_payroll/i18n/it.po @@ -0,0 +1,49 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_ch_hr_payroll +# +# Translators: +# Stefano , 2015 +msgid "" +msgstr "" +"Project-Id-Version: l10n-switzerland (9.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-03-16 01:38+0000\n" +"PO-Revision-Date: 2016-03-15 12:30+0000\n" +"Last-Translator: OCA Transbot \n" +"Language-Team: Italian (http://www.transifex.com/oca/OCA-l10n-switzerland-9-0/language/it/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: it\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: l10n_ch_hr_payroll +#: model:ir.model,name:l10n_ch_hr_payroll.model_hr_contract +msgid "Contract" +msgstr "Contratto" + +#. module: l10n_ch_hr_payroll +#: model:ir.model,name:l10n_ch_hr_payroll.model_hr_employee +msgid "Employee" +msgstr "Dipendente" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_contract_holiday_rate +msgid "Holiday Rate" +msgstr "Costo vacanze" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_contract_lpp_amount +msgid "LPP Amount" +msgstr "LPP totale" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_contract_lpp_rate +msgid "LPP Rate" +msgstr "Rata LPP" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_employee_children_student +msgid "Number of Children student" +msgstr "Numero di figli studenti" diff --git a/l10n_ch_hr_payroll/i18n/nb_NO.po b/l10n_ch_hr_payroll/i18n/nb_NO.po new file mode 100644 index 000000000..99c383372 --- /dev/null +++ b/l10n_ch_hr_payroll/i18n/nb_NO.po @@ -0,0 +1,49 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * l10n_ch_hr_payroll +# +# Translators: +# Imre Kristoffer Eilertsen , 2016 +msgid "" +msgstr "" +"Project-Id-Version: l10n-switzerland (9.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-07-31 03:43+0000\n" +"PO-Revision-Date: 2016-08-04 17:16+0000\n" +"Last-Translator: Imre Kristoffer Eilertsen \n" +"Language-Team: Norwegian Bokmål (Norway) (http://www.transifex.com/oca/OCA-l10n-switzerland-9-0/language/nb_NO/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: nb_NO\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: l10n_ch_hr_payroll +#: model:ir.model,name:l10n_ch_hr_payroll.model_hr_contract +msgid "Contract" +msgstr "Kontrakt" + +#. module: l10n_ch_hr_payroll +#: model:ir.model,name:l10n_ch_hr_payroll.model_hr_employee +msgid "Employee" +msgstr "Ansatt" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_contract_holiday_rate +msgid "Holiday Rate" +msgstr "Feriekurs" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_contract_lpp_amount +msgid "LPP Amount" +msgstr "LPP-sum" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_contract_lpp_rate +msgid "LPP Rate" +msgstr "" + +#. module: l10n_ch_hr_payroll +#: model:ir.model.fields,field_description:l10n_ch_hr_payroll.field_hr_employee_children_student +msgid "Number of Children student" +msgstr "Antall barneelever" diff --git a/l10n_ch_hr_payroll/migrations/8.0.1.0.8/pre-update-ir_model_data.py b/l10n_ch_hr_payroll/migrations/8.0.1.0.8/pre-update-ir_model_data.py new file mode 100755 index 000000000..2b8ef1101 --- /dev/null +++ b/l10n_ch_hr_payroll/migrations/8.0.1.0.8/pre-update-ir_model_data.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +# +# File: migrations/8.0.1.0.08/pre-update-ir_model_data.py +# Module: l10n_ch_hr_payroll +# +# Created by cyp@open-net.ch +# +# Copyright (c) 2015-TODAY Open-Net Ltd. +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# 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 . +# +############################################################################## + +""" +Set the existings salary rules as non-updatable +This will ensure the update of this module won't try +to remove any existing rule not directly referenced. +This is necessary because some rules may be already in use. +""" + + +def migrate(cr, version): + if not version: + return + + query = ("UPDATE ir_model_data " + "SET noupdate=true " + "WHERE module='l10n_ch_hr_payroll' " + "AND model='hr.salary.rule' ") + cr.execute(query) diff --git a/l10n_ch_hr_payroll/models/__init__.py b/l10n_ch_hr_payroll/models/__init__.py new file mode 100644 index 000000000..4a348322f --- /dev/null +++ b/l10n_ch_hr_payroll/models/__init__.py @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# © 2012 David Coninckx (Opennet Sarl) +# License into __openerp__.py. + +from . import hr_contract +from . import hr_employee diff --git a/l10n_ch_hr_payroll/models/hr_contract.py b/l10n_ch_hr_payroll/models/hr_contract.py new file mode 100644 index 000000000..ab39b52df --- /dev/null +++ b/l10n_ch_hr_payroll/models/hr_contract.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# © 2012 David Coninckx (Opennet Sarl) +# License into __openerp__.py. + +from openerp import fields, models +import openerp.addons.decimal_precision as dp + + +class HrContract(models.Model): + _inherit = 'hr.contract' + + holiday_rate = fields.Float(string='Holiday Rate') + lpp_rate = fields.Float(string='LPP Rate', + digits=dp.get_precision('Payroll Rate')) + lpp_amount = fields.Float(string='LPP Amount', + digits=dp.get_precision('Account')) diff --git a/l10n_ch_hr_payroll/models/hr_employee.py b/l10n_ch_hr_payroll/models/hr_employee.py new file mode 100644 index 000000000..3140ac6bb --- /dev/null +++ b/l10n_ch_hr_payroll/models/hr_employee.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# © 2012 David Coninckx (Opennet Sarl) +# License into __openerp__.py. + + +from openerp import fields, models + + +class HrEmployee(models.Model): + _inherit = 'hr.employee' + + # ---------- Fields management + + children = fields.Integer('Number of Children at school') + children_student = fields.Integer('Number of Children student') diff --git a/l10n_ch_hr_payroll/static/description/icon.png b/l10n_ch_hr_payroll/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..c59e295f73339f0be12aef69ccf5a24aaa041598 GIT binary patch literal 1007 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?H1|$#LC7uRSY)RhkE!Po3t)uoAYQOe8E`R^^i>JmbSE{z|)Bkt=2QP7U;&olB46pW%b|p_Q)$`u<=Xq4i zbDu~$pB8eE=v}hv!Hq<(uI%JirppHv-HvYE80E>un$9f#S%-P$!p~C;4PX5^eB7$~ z_qt0;m#4h*6z>d7-?mOGFDK1*`QM+;`_<#8aP@Vxue!9pJpaqzpOeqIU*5cD+3M-r zO!k#+K4HIn%Z`mJKYo4t=(!nt{O3E%fB1fgS0p+d(fzdP4C|HO!oK$P2?k46?+%^% z>aXX#{da$+O!y_uyZghd(r*iUUoMxGy|aILnVIa7jEHIenx`5gB7 zaDLG2OfAc>Ro}~&9*uF9;GS&c%l>`Yfkz&mbKk#vec53j<21G}2d5m$CpkF&GX86u zki}kJ(E-c{swJ)wB`Jv|saDBFsX&Us$iUD@*T6*Az$nDf#LC#%%E(mPz{twLVEr_X zS`-br`6-!cm1r6aOsxzoAsWtaI^74 + + + + + + hr.contract.form.inherit_ch_01 + hr.contract + + + + + + + + + + + + diff --git a/l10n_ch_hr_payroll/views/hr_employee_view.xml b/l10n_ch_hr_payroll/views/hr_employee_view.xml new file mode 100644 index 000000000..6bc939a6d --- /dev/null +++ b/l10n_ch_hr_payroll/views/hr_employee_view.xml @@ -0,0 +1,25 @@ + + + + + + hr.employee.form.inherit_ch_01 + hr.employee + + + form + + + + + + + +