summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDBR (OpenERP) <dbr@tinyerp.com>2012-04-05 12:01:56 +0530
committerDBR (OpenERP) <dbr@tinyerp.com>2012-04-05 12:01:56 +0530
commit8d0ab9cd1c5fa561fdd53429066b9ab778f469bf (patch)
treece87f1346ca0f16534e8dd9842f5ea4e405eb026
parent8eb0e42abe097024c5100bf5c8d8abf9e217609d (diff)
[ADD,IMP] HR : Add configuarion files in hr_payroll and set remove module_hr_payroll fields from hr config file
bzr revid: dbr@tinyerp.com-20120405063156-6usu8opc7ntejp2e
-rw-r--r--addons/hr/res_config.py4
-rw-r--r--addons/hr/res_config_view.xml8
-rw-r--r--addons/hr_payroll/__init__.py2
-rw-r--r--addons/hr_payroll/__openerp__.py1
-rw-r--r--addons/hr_payroll/res_config.py29
-rw-r--r--addons/hr_payroll/res_config_view.xml19
6 files changed, 53 insertions, 10 deletions
diff --git a/addons/hr/res_config.py b/addons/hr/res_config.py
index bdef8bb5cf8..743b485bf92 100644
--- a/addons/hr/res_config.py
+++ b/addons/hr/res_config.py
@@ -31,10 +31,6 @@ class human_resources_configuration(osv.osv_memory):
help ="""It installs the hr_timesheet_sheet module."""),
'module_hr_holidays': fields.boolean('Manage Holidays',
help ="""It installs the hr_holidays module."""),
- 'module_hr_payroll_account': fields.boolean('Manage Account Payroll',
- help ="""It installs the hr_payroll_account module."""),
- 'module_hr_payroll': fields.boolean('Manage HR Payroll',
- help ="""It installs the hr_payroll module."""),
'module_hr_expense': fields.boolean('Manage Employees Expenses',
help ="""It installs the hr_expense module."""),
'module_hr_recruitment': fields.boolean('Manage Recruitment Process',
diff --git a/addons/hr/res_config_view.xml b/addons/hr/res_config_view.xml
index a4056f302d3..a19520438e7 100644
--- a/addons/hr/res_config_view.xml
+++ b/addons/hr/res_config_view.xml
@@ -22,21 +22,17 @@
<button name="%(open_view_employee_list_my)d" string="Employees" type="action" icon="terp-personal"/>
<field name="module_hr_timesheet_sheet"/>
<field name="module_hr_holidays"/>
- <field name="module_hr_payroll"/>
<label string="Configure Your Salary Rules :"/>
<button string="Salary Rules" icon="gtk-go-forward" name="%(open_payroll1_modules)d" type="action" />
</group>
<separator string="Additional Features" colspan="4"/>
- <group colspan="4" col="4">
+ <group name="additional features" colspan="4" col="4">
<field name="module_hr_expense"/>
<field name="module_hr_recruitment"/>
<field name="module_hr_evaluation"/>
<field name="module_hr_contract"/>
</group>
- <group name="Account Payroll" colspan="4" col="4" attrs="{'invisible': [('module_hr_payroll','=',False)]}">
- <separator string="Account Payroll" colspan="4"/>
- <field name="module_hr_payroll_account"/>
- </group>
+
</form>
</field>
</record>
diff --git a/addons/hr_payroll/__init__.py b/addons/hr_payroll/__init__.py
index bf7fc8a67e4..b19a4f587d0 100644
--- a/addons/hr_payroll/__init__.py
+++ b/addons/hr_payroll/__init__.py
@@ -24,4 +24,6 @@ import hr_payroll
import report
import wizard
+import res_config
+
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/hr_payroll/__openerp__.py b/addons/hr_payroll/__openerp__.py
index 5469b1fb423..560bec7093c 100644
--- a/addons/hr_payroll/__openerp__.py
+++ b/addons/hr_payroll/__openerp__.py
@@ -59,6 +59,7 @@ Generic Payroll system.
'hr_payroll_data.xml',
'security/ir.model.access.csv',
'wizard/hr_payroll_contribution_register_report.xml',
+ 'res_config_view.xml',
],
'test': [
'test/payslip.yml',
diff --git a/addons/hr_payroll/res_config.py b/addons/hr_payroll/res_config.py
new file mode 100644
index 00000000000..f05c8ea580a
--- /dev/null
+++ b/addons/hr_payroll/res_config.py
@@ -0,0 +1,29 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 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/>.
+#
+##############################################################################
+
+from osv import osv, fields
+
+class human_resources_configuration(osv.osv_memory):
+ _inherit = 'human.resources.configuration'
+ _columns = {
+ 'module_hr_payroll_account': fields.boolean('Manage Account Payroll',
+ help ="""It installs the hr_payroll_account module."""),
+ }
diff --git a/addons/hr_payroll/res_config_view.xml b/addons/hr_payroll/res_config_view.xml
new file mode 100644
index 00000000000..3fe3981c581
--- /dev/null
+++ b/addons/hr_payroll/res_config_view.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+ <record id="view_hr_config_inherit" model="ir.ui.view">
+ <field name="name">Account Payroll Application</field>
+ <field name="model">human.resources.configuration</field>
+ <field name="type">form</field>
+ <field name="inherit_id" ref="hr.view_human_resources_configuration"/>
+ <field name="arch" type="xml">
+ <xpath expr="//group[@name='additional features']" position="after">
+ <group name="Account Payroll" colspan="4" col="4">
+ <separator string="Account Payroll" colspan="4"/>
+ <field name="module_hr_payroll_account"/>
+ </group>
+ </xpath>
+ </field>
+ </record>
+ </data>
+</openerp>