diff options
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/hr/__terp__.py | 3 | ||||
| -rwxr-xr-x | addons/hr/hr.py | 11 | ||||
| -rw-r--r-- | addons/hr/hr_data.xml | 18 | ||||
| -rw-r--r-- | addons/hr/hr_view.xml | 29 | ||||
| -rw-r--r-- | addons/hr/security/ir.model.access.csv | 1 | ||||
| -rw-r--r-- | addons/hr_contract/hr_contract.py | 10 | ||||
| -rw-r--r-- | addons/hr_contract/hr_contract_data.xml | 13 | ||||
| -rw-r--r-- | addons/hr_contract/hr_contract_view.xml | 25 | ||||
| -rw-r--r-- | addons/hr_contract/security/ir.model.access.csv | 1 |
9 files changed, 60 insertions, 51 deletions
diff --git a/addons/hr/__terp__.py b/addons/hr/__terp__.py index f78bdc4ef18..4063b327545 100644 --- a/addons/hr/__terp__.py +++ b/addons/hr/__terp__.py @@ -44,7 +44,8 @@ 'hr_view.xml', 'hr_department_view.xml', 'process/hr_process.xml', - 'hr_installer.xml' + 'hr_installer.xml', + 'hr_data.xml' ], 'demo_xml': ['hr_demo.xml', 'hr_department_demo.xml'], diff --git a/addons/hr/hr.py b/addons/hr/hr.py index 06196c3bd39..d3f4da23475 100755 --- a/addons/hr/hr.py +++ b/addons/hr/hr.py @@ -52,6 +52,15 @@ class hr_employee_category(osv.osv): hr_employee_category() +class hr_employee_marital_status(osv.osv): + _name = "hr.employee.marital.status" + _description = "Employee Marital Status" + _columns = { + 'name' : fields.char('Marital Status', size=30, required=True), + 'description' : fields.text('Status Description'), + } +hr_employee_marital_status() + class hr_employee(osv.osv): _name = "hr.employee" _description = "Employee" @@ -63,7 +72,7 @@ class hr_employee(osv.osv): 'sinid': fields.char('SIN No', size=32), 'otherid': fields.char('Other ID', size=32), 'gender': fields.selection([('',''),('male','Male'),('female','Female')], 'Gender'), - 'marital': fields.selection([('married','Married'),('unmarried','Unmarried'),('divorced','Divorced'),('other','Other')],'Marital Status', size=32), + 'marital': fields.many2one('hr.employee.marital.status', 'Marital Status'), 'address_id': fields.many2one('res.partner.address', 'Working Address'), 'address_home_id': fields.many2one('res.partner.address', 'Home Address'), diff --git a/addons/hr/hr_data.xml b/addons/hr/hr_data.xml new file mode 100644 index 00000000000..7125afb17d4 --- /dev/null +++ b/addons/hr/hr_data.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<openerp> + <data noupdate="1"> + <!-- Employee Marital Statusses --> + <record id="hr_employee_marital_status_single" model="hr.employee.marital.status"> + <field name="name">Single</field> + </record> + <record id="hr_employee_marital_status_married" model="hr.employee.marital.status"> + <field name="name">Married</field> + </record> + <record id="hr_employee_marital_status_divorced" model="hr.employee.marital.status"> + <field name="name">Divorced</field> + </record> + <record id="hr_employee_marital_status_widower" model="hr.employee.marital.status"> + <field name="name">Widower</field> + </record> + </data> +</openerp> diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml index 66d9ee88dce..edc67a4bc1b 100644 --- a/addons/hr/hr_view.xml +++ b/addons/hr/hr_view.xml @@ -137,6 +137,35 @@ <!-- ======================= + Employee marital status + ======================= + --> + <record id="hr_hr_employee_marital_status_form" model="ir.ui.view"> + <field name="name">hr.hr.employee.marital.status</field> + <field name="model">hr.employee.marital.status</field> + <field name="type">form</field> + <field name="arch" type="xml"> + <form string="Marital Status"> + <field colspan="4" name="name" nolabel="1" select="1"/> + <field colspan="4" name="description" nolabel="1"/> + </form> + </field> + </record> + + <record id="action_hr_marital_status" model="ir.actions.act_window"> + <field name="name">Marital Status</field> + <field name="res_model">hr.employee.marital.status</field> + <field name="view_type">form</field> + <field name="view_mode">tree,form</field> + </record> + + <menuitem + action="action_hr_marital_status" + id="hr_menu_marital_status" + parent="hr.menu_view_employee_category_configuration_form" sequence="3"/> + + <!-- + ======================= Employee architecture ======================= --> diff --git a/addons/hr/security/ir.model.access.csv b/addons/hr/security/ir.model.access.csv index 676a1c36eba..cd1a18d246b 100644 --- a/addons/hr/security/ir.model.access.csv +++ b/addons/hr/security/ir.model.access.csv @@ -4,3 +4,4 @@ "access_hr_department","hr.department","model_hr_department","hr.group_hr_user",1,0,0,0 "access_hr_employee_category_manager","hr.employee.category.manager","model_hr_employee_category","hr.group_hr_manager",1,1,1,1 "access_hr_department_manager","hr.department.manager","model_hr_department","hr.group_hr_manager",1,1,1,1 +"access_hr_employee_marital_status","hr.employee.marital.status","model_hr_employee_marital_status","hr.group_hr_user",1,1,1,1 diff --git a/addons/hr_contract/hr_contract.py b/addons/hr_contract/hr_contract.py index 7eea1133a6b..52d66c7a514 100644 --- a/addons/hr_contract/hr_contract.py +++ b/addons/hr_contract/hr_contract.py @@ -23,15 +23,6 @@ from osv import fields, osv import time -class hr_employee_marital_status(osv.osv): - _name = "hr.employee.marital.status" - _description = "Employee Marital Status" - _columns = { - 'name' : fields.char('Marital Status', size=30, required=True), - 'description' : fields.text('Status Description'), - } -hr_employee_marital_status() - class hr_employee(osv.osv): _name = "hr.employee" _description = "Employee" @@ -41,7 +32,6 @@ class hr_employee(osv.osv): 'medic_exam' : fields.date('Medical examination date'), 'audiens_num' : fields.char('AUDIENS Number', size=30), 'place_of_birth' : fields.char('Place of Birth', size=30), - 'marital_status' : fields.many2one('hr.employee.marital.status', 'Marital Status'), 'children' : fields.integer('Number of children'), 'contract_ids' : fields.one2many('hr.contract', 'employee_id', 'Contracts'), } diff --git a/addons/hr_contract/hr_contract_data.xml b/addons/hr_contract/hr_contract_data.xml index 821e4bdac4f..511bbce3f4e 100644 --- a/addons/hr_contract/hr_contract_data.xml +++ b/addons/hr_contract/hr_contract_data.xml @@ -25,18 +25,5 @@ <field name="period_id" ref="hr_contract_wage_type_period_monthly"/> </record> - <!-- Employee Marital Statusses --> - <record id="hr_employee_marital_status_single" model="hr.employee.marital.status"> - <field name="name">Single</field> - </record> - <record id="hr_employee_marital_status_married" model="hr.employee.marital.status"> - <field name="name">Married</field> - </record> - <record id="hr_employee_marital_status_divorced" model="hr.employee.marital.status"> - <field name="name">Divorced</field> - </record> - <record id="hr_employee_marital_status_widower" model="hr.employee.marital.status"> - <field name="name">Widower</field> - </record> </data> </openerp> diff --git a/addons/hr_contract/hr_contract_view.xml b/addons/hr_contract/hr_contract_view.xml index ecc4be6bd11..97b63282f24 100644 --- a/addons/hr_contract/hr_contract_view.xml +++ b/addons/hr_contract/hr_contract_view.xml @@ -15,18 +15,6 @@ </record> - <record id="hr_hr_employee_marital_status_form" model="ir.ui.view"> - <field name="name">hr.hr.employee.marital.status</field> - <field name="model">hr.employee.marital.status</field> - <field name="type">form</field> - <field name="arch" type="xml"> - <form string="Marital Status"> - <field colspan="4" name="name" nolabel="1" select="1"/> - <field colspan="4" name="description" nolabel="1"/> - </form> - </field> - </record> - <record id="hr_contract_wage_type_view_form" model="ir.ui.view"> <field name="name">hr.contract.wage.type.view.form</field> <field name="model">hr.contract.wage.type</field> @@ -118,7 +106,6 @@ <field name="medic_exam" select="1"/> <field name="audiens_num"/> <field name="place_of_birth"/> - <field name="marital_status"/> <field name="children"/> </page> </notebook> @@ -137,18 +124,6 @@ </field> </record> - <record id="action_hr_marital_status" model="ir.actions.act_window"> - <field name="name">Marital Status</field> - <field name="res_model">hr.employee.marital.status</field> - <field name="view_type">form</field> - <field name="view_mode">tree,form</field> - </record> - - <menuitem - action="action_hr_marital_status" - id="hr_menu_marital_status" - parent="hr.menu_view_employee_category_configuration_form" sequence="3"/> - <record id="hr_contract_view_form" model="ir.ui.view"> <field name="name">hr.contract.view.form</field> <field name="model">hr.contract</field> diff --git a/addons/hr_contract/security/ir.model.access.csv b/addons/hr_contract/security/ir.model.access.csv index 053b5c42ecd..29290f16067 100644 --- a/addons/hr_contract/security/ir.model.access.csv +++ b/addons/hr_contract/security/ir.model.access.csv @@ -1,5 +1,4 @@ "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" -"access_hr_employee_marital_status","hr.employee.marital.status","model_hr_employee_marital_status","hr.group_hr_user",1,1,1,1 "access_hr_contract_wage_type_period_user","hr.contract.wage.type.period user","model_hr_contract_wage_type_period","hr.group_hr_user",1,0,0,0 "access_hr_contract_wage_type_period","hr.contract.wage.type.period","model_hr_contract_wage_type_period","hr.group_hr_manager",1,1,1,1 "access_hr_contract_wage_type_user","hr.contract.wage.type user","model_hr_contract_wage_type","hr.group_hr_user",1,0,0,0 |
