[ADD] l10n_be_payroll: initial commit

bzr revid: osenda-20110407150501-hzo5uf7omflrx7r2
This commit is contained in:
Osenda
2011-04-07 17:05:01 +02:00
parent 7785eb0c2a
commit 874099dbcf
14 changed files with 4860 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# 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/>.
#
##############################################################################
import hr_payroll_rule
import hr_contract
import hr_payroll
+38
View File
@@ -0,0 +1,38 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# 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': 'hr_payroll_salary_rule',
'category': 'payroll',
'init_xml':[],
'author': 'AOS',
'depends': ['hr_payroll','hr_contract'],
'version': '1.0',
'active': False,
'demo_xml': [],
'update_xml':[
# 'res.users.csv',
# 'security/hr.salary.rule.csv',
'hr_payroll_rule_view.xml',
'hr_payroll_rule_data.xml',
'data/hr.salary.rule.csv',
],
'installable': True
}
+22
View File
@@ -0,0 +1,22 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# 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/>.
#
##############################################################################
import hr_payroll
import l10n_be_payroll
@@ -0,0 +1,37 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# 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': 'hr_payroll_salary_rule',
'category': 'payroll',
'init_xml':[],
'author': 'AOS',
'depends': ['base','hr_payroll','l10n_be'],
'version': '1.0',
'active': False,
'demo_xml': [],
'update_xml':[
# 'res.users.csv',
# 'security/hr.salary.rule.csv',
'hr_payroll_rule.xml',
'data/hr.salary.rule.csv',
],
'installable': True
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,32 @@
#-*- coding:utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# d$
#
# 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/>.
#
##############################################################################
import time
from datetime import date
from datetime import datetime
from datetime import timedelta
import netsvc
from osv import fields, osv
import tools
@@ -0,0 +1,139 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="hr_payroll_rules_major" model="hr.salary.head">
<field name="name">Salaire Majore</field>
<field name="code">MAJ</field>
<field name="type">1</field>
</record>
<record id="hr_payroll_rules_onss_head" model="hr.salary.head">
<field name="name">Office National Securite Sociale</field>
<field name="code">ONSS</field>
<field name="type">2</field>
</record>
<record id="hr_payroll_rules_pp_b1" model="hr.salary.head">
<field name="name">Precompte Professionnel Bareme I</field>
<field name="code">P.P.</field>
<field name="type">2</field>
<field name="note"> CE BAREME EST APPLICABLE :
- LORSQUE LE BENEFICIAIRE DES REVENUS EST UN ISOLE;
PRECOMPTE PROFESSIONNEL DU SUR :
- LES REMUNERATIONS DES TRAVAILLEURS :</field>
</record>
<record id="hr_payroll_rules_pp_b2" model="hr.salary.head">
<field name="name">Precompte Professionnel Bareme II</field>
<field name="code">P.P.</field>
<field name="type">2</field>
<field name="note"> CE BAREME EST APPLICABLE LORSQUE LE CONJOINT DU
BENEFICIAIRE DES REVENUS N'A PAS DE REVENUS PROFESSIONNELS PROPRES.
PRECOMPTE PROFESSIONNEL DU SUR :
- LES REMUNERATIONS DES TRAVAILLEURS </field>
</record>
<record id="hr_payroll_rules_pp_b3" model="hr.salary.head">
<field name="name">Precompte Professionnel Bareme III</field>
<field name="code">P.P.</field>
<field name="type">2</field>
<field name="note">CE BAREME EST APPLICABLE LORSQUE LE BENEFICIAIRE
DES REVENUS EST UN NON-RESIDENT QUI N'A PAS MAINTENU
UN FOYER D'HABITATION EN BELGIQUE DURANT TOUTE LA PERIODE IMPOSABLE.
PRECOMPTE PROFESSIONNEL DU SUR :
- LES REMUNERATIONS DES TRAVAILLEURS </field>
</record>
<record id="hr_payroll_rules_child" model="hr.salary.head">
<field name="name">Child Allowance Belgium</field>
<field name="code">CH.ALW</field>
<field name="type">1</field>
<field name="note">Le bénéficiaire des revenus est un isolé OU le conjoint du bénéficiaire des revenus a également des
revenus professionnels (barème I/ barème II)
A.Lorsque les rémunérations mensuelles brutes ne dépassent pas 7.500 EUR, le précompte professionnel est déterminé suivant le barème I.
Les réductions suivantes sont ensuite déduites du précompte professionnel déterminé suivant ce barème :
a) Réduction pour enfants à charge</field>
</record>
<!-- HR SALAR RULES-->
<record id="hr_payroll_rules_maj" model="hr.salary.rule">
<field name="category_id" ref="hr_payroll_rules_major"/>
<field name="name">Salaire Majore</field>
<field name="code">MAJ</field>
<field name="type">1</field>
<field name="amount_type">per</field>
<field name="amount">108.00</field>
<field name="conditions">True</field>
<field name="computational_expression"> basic = basic * 1.08 </field>
</record>
<record id="hr_payroll_rules_onss_rule" model="hr.salary.rule">
<field name="category_id" ref="hr_payroll_rules_onss_head"/>
<field name="name">ONSS</field>
<field name="code">ONSS</field>
<field name="type">2</field>
<field eval="40" name="sequence"/>
<field name="amount_type">per</field>
<field eval="13.07" name="amount"/>
<field name="conditions">True</field>
<field name="computational_expression"> basic = basic / 1.307</field>
</record>
<record id="hr_payroll_rules_p_p_b1" model="hr.salary.rule">
<field name="category_id" ref="hr_payroll_rules_pp_b1"/>
<field name="name">Precompte Professionnel Bareme I</field>
<field name="code">P.P</field>
<field name="type">2</field>
<field name="sequence">50</field>
<field name="computational_expression"> basic = basic - amount</field>
</record>
<record id="hr_payroll_rules_p_p_b2" model="hr.salary.rule">
<field name="category_id" ref="hr_payroll_rules_pp_b2"/>
<field name="name">Precompte Professionnel Bareme II</field>
<field name="code">P.P</field>
<field name="type">2</field>
<field name="sequence">50</field>
<field name="computational_expression"> basic = basic - amount</field>
</record>
<record id="hr_payroll_rules_p_p_b3" model="hr.salary.rule">
<field name="category_id" ref="hr_payroll_rules_pp_b3"/>
<field name="name">Precompte Professionnel Bareme III</field>
<field name="code">P.P</field>
<field name="type">2</field>
<field name="sequence">50</field>
<field name="computational_expression"> basic = basic - amount</field>
</record>
<record id="hr_payroll_rules_child_alw" model="hr.salary.rule">
<field name="category_id" ref="hr_payroll_rules_child"/>
<field name="name">Child Allowance Belgium</field>
<field name="code">Ch.A</field>
<field name="type">1</field>
<field name="amount_type">per</field>
<field name="sequence">51</field>
</record>
<record id="hr_payroll_salary_structure_employee" model="hr.payroll.structure">
<field name="code">B.E.E</field>
<field name="name">Belgian Employee</field>
<field eval="[([ref('hr_payroll_rules_onss_rule')])]" name="rule_ids"/>
</record>
<record id="hr_payroll_salary_structure_worker" model="hr.payroll.structure">
<field name="code">B.E.W</field>
<field name="name">Belgian Worker</field>
<field name="rule_ids"/>
</record>
</data>
</openerp>
@@ -0,0 +1,3 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_hr_salary_head","hr.salary.head","model_hr_salary_head","base.group_hr_user",1,1,1,1
"access_hr_salary_rule","hr.salary.rule","model_hr_salary_rule","base.group_hr_user",1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_hr_salary_head hr.salary.head model_hr_salary_head base.group_hr_user 1 1 1 1
3 access_hr_salary_rule hr.salary.rule model_hr_salary_rule base.group_hr_user 1 1 1 1
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+68
View File
@@ -0,0 +1,68 @@
#-*- coding:utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# d$
#
# 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/>.
#
##############################################################################
import time
from datetime import date
from datetime import datetime
from datetime import timedelta
import netsvc
from osv import fields, osv
import tools
from tools.translate import _
import decimal_precision as dp
class hr_contract_be(osv.osv):
_inherit = 'hr.contract'
_description = 'Add for belgium users'
_columns = {
'rem_frais_dep':fields.float('Reimbursement of travel expenses', digits=(16,2)),
'voiture_soc':fields.float('Company car ', digits=(16,2)),
'divers_ex_onss':fields.float('Miscellaneous exempt ONSS ', digits=(16,2)),
'valeur_cheque':fields.float('Check Value Meal ', digits=(16,2)),
'part_trav':fields.float('Check Value Meal - by worker ', digits=(16,2)),
'assurance':fields.float('Insurance Group - by worker ', digits=(16,2)),
'avantage':fields.float('Benefits of various nature ', digits=(16,2)),
'suppl_net':fields.float('Net supplements', digits=(16,2)),
'retenus_net':fields.float('Net retained ', digits=(16,2)),
'volontariat_fiscal':fields.float('Voluntary tax ', digits=(16,2)),
'horaire_effectif': fields.many2one('resource.calendar','Actual Work', help="Hours of work means the actual working time elapsing between the beginning and end of the workday, regardless of where it runs, excluding the stop work devoted to meals, breaks and, more generally, any interruptions between 2 sequences of work that are not actually worked since the employee can go freely about his personal affairs"),
}
hr_contract_be()
class hr_employee_be(osv.osv):
_inherit = 'hr.employee'
_description = 'same as before'
_columns = {
'statut_fiscal':fields.selection([('without income','Without Income'),('with income','With Income')], 'Statut Fiscal'),
'handicap':fields.boolean('Handicap'),
'handicap_child':fields.boolean('Handicap Children'),
'resident':fields.boolean('Residente'),
'number_handicap':fields.integer('Number of Handicap'),
}
hr_employee_be()
@@ -0,0 +1,180 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="hr_payroll_head_major" model="hr.salary.head">
<field name="name">Salaire Majore</field>
<field name="code">MAJ</field>
<field name="type">1</field>
</record>
<record id="hr_payroll_head_onss" model="hr.salary.head">
<field name="name">Office National Securite Sociale</field>
<field name="code">ONSS</field>
<field name="type">2</field>
</record>
<record id="hr_payroll_head_pp" model="hr.salary.head">
<field name="name">Precompte Professionnel Bareme 2011</field>
<field name="code">P.P.</field>
<field name="type">2</field>
</record>
<record id="hr_payroll_head_imposable" model="hr.salary.head">
<field name="name">Montant Imposable</field>
<field name="code">IMP</field>
<field name="type">2</field>
</record>
<record id="hr_payroll_head_non_imposable" model="hr.salary.head">
<field name="name">Montant Non Imposable</field>
<field name="code">N.IMP</field>
<field name="type">2</field>
</record>
<record id="hr_payroll_head_child" model="hr.salary.head">
<field name="name">Child Allowance Belgium</field>
<field name="code">CH.ALW</field>
<field name="type">1</field>
<field name="note">Le bénéficiaire des revenus est un isolé OU le conjoint du bénéficiaire des revenus a également des
revenus professionnels (barème I/ barème II)
A.Lorsque les rémunérations mensuelles brutes ne dépassent pas 7.500 EUR, le précompte professionnel est déterminé suivant le barème I.
Les réductions suivantes sont ensuite déduites du précompte professionnel déterminé suivant ce barème :
a) Réduction pour enfants à charge</field>
</record>
<record id="hr_payroll_head_company_car" model="hr.salary.head">
<field name="name">Company car</field>
<field name="code">C.C.</field>
<field name="type">2</field>
</record>
<record id="hr_payroll_head_cheque_repas" model="hr.salary.head">
<field name="name">Chèque repas</field>
<field name="code">C.R.</field>
<field name="type">1</field>
</record>
<!-- HR SALAR RULES-->
<!--
<record id="hr_payroll_rules_maj" model="hr.salary.rule">
<field name="category_id" ref="hr_payroll_head_major"/>
<field name="name">Salaire Majore</field>
<field name="code">MAJ</field>
<field name="type">1</field>
<field name="amount_select">percentage</field>
<field name="amount_percentage">108.00</field>
<field name="condition_select">range</field>
<field name="condition_range">contract.wage</field>
<field name="amount_percentage_base">contract.wage</field>
</record>
<record id="hr_payroll_rules_onss_rule" model="hr.salary.rule">
<field name="category_id" ref="hr_payroll_head_onss"/>
<field name="name">ONSS</field>
<field name="code">ONSS</field>
<field name="type">2</field>
<field name="sequence">40</field>
<field name="amount_select">percentage</field>
<field name="amount_percentage">13.07</field>
<field name="condition_select">range</field>
<field name="condition_range">contract.wage</field>
<field name="amount_percentage_base">contract.wage</field>
</record>
-->
<record id="hr_payroll_rules_p_p_b1" model="hr.salary.rule">
<field name="category_id" ref="hr_payroll_head_pp"/>
<field name="name">Precompte Professionnel Bareme 2011</field>
<field name="code">P.P</field>
<field name="type">2</field>
<field name="sequence">50</field>
<field name="amount_select">fix</field>
<field name="condition_select">range</field>
<!-- <field eval="[(6, 0, [ref('hr_payroll_rules_baremeI'), ref('hr_payroll_rules_baremeII'), ref('hr_payroll_rules_baremeIII')])]" name="child_ids"/>-->
</record>
<record id="hr_payroll_rules_bareme" model="hr.salary.rule">
<field name="category_id" ref="hr_payroll_head_pp"/>
<field name="parent_rule_id" ref="hr_payroll_rules_p_p_b1"/>
<field name="name">Bareme</field>
<field name="code">B.I.</field>
<field name="type">2</field>
<field name="amount_select">code</field>
<field name="sequence">50</field>
<field name="condition_select">python</field>
<field name="condition_python">employee.marital=='single'</field>
</record>
<record id="hr_payroll_rules_baremeII" model="hr.salary.rule">
<field name="category_id" ref="hr_payroll_head_pp"/>
<field name="parent_rule_id" ref="hr_payroll_rules_p_p_b1"/>
<field name="name">Bareme II</field>
<field name="code">B.II</field>
<field name="type">2</field>
<field name="amount_select">fix</field>
<field name="sequence">50</field>
<field name="condition_select">python</field>
<field name="condition_python">employee.marital=='married'</field>
</record>
<record id="hr_payroll_rules_baremeIII" model="hr.salary.rule">
<field name="category_id" ref="hr_payroll_head_pp"/>
<field name="parent_rule_id" ref="hr_payroll_rules_p_p_b1"/>
<field name="name">Bareme III</field>
<field name="code">B.III</field>
<field name="type">2</field>
<field name="amount_select">fix</field>
<field name="sequence">50</field>
<field name="condition_select">python</field>
</record>
<record id="hr_payroll_rules_child_alw" model="hr.salary.rule">
<field name="category_id" ref="hr_payroll_head_child"/>
<field name="name">Child Allowance Belgium</field>
<field name="code">Ch.A</field>
<field name="type">1</field>
<field name="amount_select">fix</field>
<field name="sequence">51</field>
<field name="condtion_select">range</field>
<field name="condition_range">employee.children</field>
</record>
<record id="hr_payroll_rules_company_car" model="hr.salary.rule">
<field name="category_id" ref="hr_payroll_head_company_car"/>
<field name="name">Company car</field>
<field name="code">C.C.</field>
<field name="type">2</field>
<field name="amount_type">percentage</field>
<field name="sequence">60</field>
<field name="computational_expression">...</field>
<field name="expression_result">...</field>
</record>
<record id="hr_payroll_rules_cheque_repas" model="hr.salary.rule">
<field name="category_id" ref="hr_payroll_head_cheque_repas"/>
<field name="name">chèque repas</field>
<field name="code">C.R.</field>
<field name="type">1</field>
<field name="amount_type">fix</field>
<field name="sequence">65</field>
<field name="computational_expression">...</field>
<field name="expression_result">...</field>
</record>
<record id="hr_payroll_salary_structure_employee" model="hr.payroll.structure">
<field name="code">C.P.218</field>
<field name="name">Belgian Employee</field>
<!-- <field eval="[(6, 0, [ref('hr_payroll_rules_onss_rule'),ref('hr_payroll_rules_p_p_b1'),ref('hr_payroll_rules_child_alw')])]" name="rule_ids"/>-->
</record>
<record id="hr_payroll_salary_structure_worker" model="hr.payroll.structure">
<field name="code">C.P.219</field>
<field name="name">Belgian Worker</field>
<!-- <field eval="[(6, 0, [ref('hr_payroll_rules_maj'), ref('hr_payroll_rules_onss_rule'),ref('hr_payroll_rules_p_p_b1'),ref('hr_payroll_rules_child_alw')])]" name="rule_ids"/>-->
</record>
</data>
</openerp>
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="hr_contract_form_inherit" model="ir.ui.view">
<field name="name">hr.contract.form.inherit</field>
<field name="model">hr.contract</field>
<field name="type">form</field>
<field name="inherit_id" ref="hr_contract.hr_contract_view_form"/>
<field name="arch" type="xml">
<data>
<xpath expr="/form/notebook/page/group/field[@name='working_hours']" position="after">
<field name="horaire_effectif"/>
</xpath>
<xpath expr="/form/notebook/page/group/field[@name='advantages']" position="before">
<field name="rem_frais_dep"/>
<field name="voiture_soc"/>
<field name="divers_ex_onss"/>
<field name="part_trav"/>
<field name="assurance"/>
<field name="avantage"/>
<group colspan="2" col="2">
<separator string="Miscellaneous" colspan="2"/>
<field name="suppl_net"/>
<field name="retenus_net"/>
<field name="volontariat_fiscal"/>
</group>
</xpath>
</data>
</field>
</record>
<record id="hr_contract.hr_hr_employee_view_for" model="ir.ui.view">
<field name="name">hr.hr.employee.view.for</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_form"/>
<field name="arch" type="xml">
<data>
<xpath expr="/form/notebook/page/group/field[@name='marital']" position="after">
<field name="statut_fiscal" help="Only if Married"/>
<field name="handicap" help="Only if Married"/>
</xpath>
<xpath expr="/form/notebook/page/group/field[@name='children']" position="after">
<field name="handicap_child"/>
<field name="number_handicap" attrs="{'invisible':[('handicap_child','!=',True)]}" colspan="1"/>
</xpath>
</data>
</field>
</record>
</data>
</openerp>
@@ -0,0 +1,3 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_hr_salary_head","hr.salary.head","model_hr_salary_head","base.group_hr_user",1,1,1,1
"access_hr_salary_rule","hr.salary.rule","model_hr_salary_rule","base.group_hr_user",1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_hr_salary_head hr.salary.head model_hr_salary_head base.group_hr_user 1 1 1 1
3 access_hr_salary_rule hr.salary.rule model_hr_salary_rule base.group_hr_user 1 1 1 1