From 34f15e56d971dd85720f5c4a7b06a6216360ff46 Mon Sep 17 00:00:00 2001 From: "Amit Bhavsar (Open ERP)" Date: Wed, 26 Jun 2013 17:46:17 +0530 Subject: [PATCH] [HR] Improve view,title,tooltip and code. bzr revid: amb@tinyerp.com-20130626121617-17i92ua5yty8htwu --- addons/hr/hr.py | 2 +- addons/hr/hr_view.xml | 3 +-- addons/hr_contract/hr_contract.py | 7 +++++++ addons/hr_contract/hr_contract_view.xml | 5 +++-- addons/hr_payroll/hr_payroll_view.xml | 13 ++++++------- .../hr_payroll_contribution_register_report.xml | 8 +++++--- addons/hr_recruitment/hr_recruitment_view.xml | 2 +- addons/hr_timesheet/hr_timesheet.py | 2 +- addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py | 2 +- 9 files changed, 26 insertions(+), 18 deletions(-) diff --git a/addons/hr/hr.py b/addons/hr/hr.py index 4849d3a7d8b..086794b5cca 100644 --- a/addons/hr/hr.py +++ b/addons/hr/hr.py @@ -190,7 +190,7 @@ class hr_employee(osv.osv): 'child_ids': fields.one2many('hr.employee', 'parent_id', 'Subordinates'), 'resource_id': fields.many2one('resource.resource', 'Resource', ondelete='cascade', required=True), 'coach_id': fields.many2one('hr.employee', 'Coach'), - 'job_id': fields.many2one('hr.job', 'Job'), + 'job_id': fields.many2one('hr.job', 'Job Title'), # image: all image fields are base64 encoded and PIL-supported 'image': fields.binary("Photo", help="This field holds the image used as photo for the employee, limited to 1024x1024px."), diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml index eb1bbe451b4..05a21c2908a 100644 --- a/addons/hr/hr_view.xml +++ b/addons/hr/hr_view.xml @@ -380,10 +380,9 @@ - - + diff --git a/addons/hr_contract/hr_contract.py b/addons/hr_contract/hr_contract.py index 0cd31d66bcf..5e78ff3287a 100644 --- a/addons/hr_contract/hr_contract.py +++ b/addons/hr_contract/hr_contract.py @@ -88,6 +88,13 @@ class hr_contract(osv.osv): 'type_id': _get_type } + def onchange_employee_id(self, cr, uid, ids, employee_id, context=None): + if not employee_id: + return {'value':{}} + emp_obj = self.pool.get('hr.employee').browse(cr, uid, employee_id, context=context) + val = {'job_id': emp_obj.job_id.id} + return {'value': val} + def _check_dates(self, cr, uid, ids, context=None): for contract in self.read(cr, uid, ids, ['date_start', 'date_end'], context=context): if contract['date_start'] and contract['date_end'] and contract['date_start'] > contract['date_end']: diff --git a/addons/hr_contract/hr_contract_view.xml b/addons/hr_contract/hr_contract_view.xml index 0659d661420..57a04dc9517 100644 --- a/addons/hr_contract/hr_contract_view.xml +++ b/addons/hr_contract/hr_contract_view.xml @@ -73,14 +73,15 @@
+
- - + + diff --git a/addons/hr_payroll/hr_payroll_view.xml b/addons/hr_payroll/hr_payroll_view.xml index ccd87ba2616..ce823d70369 100644 --- a/addons/hr_payroll/hr_payroll_view.xml +++ b/addons/hr_payroll/hr_payroll_view.xml @@ -70,8 +70,8 @@ - + @@ -227,13 +227,12 @@
+ diff --git a/addons/hr_payroll/wizard/hr_payroll_contribution_register_report.xml b/addons/hr_payroll/wizard/hr_payroll_contribution_register_report.xml index 8cfaa85518a..7600733c67a 100644 --- a/addons/hr_payroll/wizard/hr_payroll_contribution_register_report.xml +++ b/addons/hr_payroll/wizard/hr_payroll_contribution_register_report.xml @@ -7,14 +7,16 @@ payslip.lines.contribution.register -
-
+
+
diff --git a/addons/hr_recruitment/hr_recruitment_view.xml b/addons/hr_recruitment/hr_recruitment_view.xml index 9cbfd4560e7..5b12defcf98 100644 --- a/addons/hr_recruitment/hr_recruitment_view.xml +++ b/addons/hr_recruitment/hr_recruitment_view.xml @@ -12,7 +12,7 @@ name="Meetings" res_model="crm.meeting" src_model="hr.applicant" - view_mode="tree,form,calendar,graph" + view_mode="calendar,tree,form,graph" view_type="form"/> diff --git a/addons/hr_timesheet/hr_timesheet.py b/addons/hr_timesheet/hr_timesheet.py index f49ad05f7a9..5baf8ec262b 100644 --- a/addons/hr_timesheet/hr_timesheet.py +++ b/addons/hr_timesheet/hr_timesheet.py @@ -29,7 +29,7 @@ class hr_employee(osv.osv): _name = "hr.employee" _inherit = "hr.employee" _columns = { - 'product_id': fields.many2one('product.product', 'Product', help="Specifies employee's designation as a product with type 'service'."), + 'product_id': fields.many2one('product.product', 'Product', help="If you want to reinvoice working time of employees, link this employee to a service to determinate the cost price of the job."), 'journal_id': fields.many2one('account.analytic.journal', 'Analytic Journal'), 'uom_id': fields.related('product_id', 'uom_id', type='many2one', relation='product.uom', string='Unit of Measure', store=True, readonly=True) } diff --git a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py index fc715ece5b8..e7364f6caf4 100644 --- a/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py +++ b/addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py @@ -44,7 +44,7 @@ class hr_contract(osv.osv): 'driver_salay': fields.boolean('Driver Salary', help="Check this box if you provide allowance for driver"), 'medical_insurance': fields.float('Medical Insurance', digits_compute=dp.get_precision('Payroll'), help="Deduction towards company provided medical insurance"), 'voluntary_provident_fund': fields.float('Voluntary Provident Fund (%)', digits_compute=dp.get_precision('Payroll'), help="VPF is a safe option wherein you can contribute more than the PF ceiling of 12% that has been mandated by the government and VPF computed as percentage(%)"), - 'house_rent_allowance_metro_nonmetro': fields.float('House Rent Allowance (%)', digits_compute=dp.get_precision('Payroll'), help="HRA is an allowance given by the employer to the employee for taking care of his rental or accommodation expenses for metro city it is 50 % and for non metro 40%.HRA computed as percentage(%)"), + 'house_rent_allowance_metro_nonmetro': fields.float('House Rent Allowance (%)', digits_compute=dp.get_precision('Payroll'), help="HRA is an allowance given by the employer to the employee for taking care of his rental or accommodation expenses for metro city it is 50 % and for non metro 40%. \nHRA computed as percentage(%)"), 'supplementary_allowance': fields.float('Supplementary Allowance', digits_compute=dp.get_precision('Payroll')), }