diff --git a/addons/hr/hr.py b/addons/hr/hr.py index a2c4ee3805b..13db46ccc22 100644 --- a/addons/hr/hr.py +++ b/addons/hr/hr.py @@ -142,8 +142,8 @@ class hr_employee(osv.osv): 'work_email': fields.char('Work E-mail', size=240), 'work_location': fields.char('Office Location', size=32), 'notes': fields.text('Notes'), - 'parent_id': fields.many2one('hr.employee', 'Manager'), - 'category_ids': fields.many2many('hr.employee.category', 'employee_category_rel', 'emp_id', 'category_id', 'Category'), + 'parent_id': fields.many2one('hr.employee', 'Manager'), + 'category_ids': fields.many2many('hr.employee.category', 'employee_category_rel', 'emp_id', 'category_id', 'Categories'), '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'), @@ -231,7 +231,7 @@ class res_users(osv.osv): except: # Tolerate a missing shortcut. See product/product.py for similar code. logging.getLogger('orm').debug('Skipped meetings shortcut for user "%s"', data.get('name',' + @@ -157,12 +158,12 @@ - - Employees - ir.ui.menu - - - + + Employees + ir.ui.menu + + + Basic @@ -177,7 +49,7 @@ none code - result = heads['BASIC'] + ('ALW' in heads and heads['ALW'] or 0.0) + result = categories['BASIC'] + ('ALW' in categories and categories['ALW'] or 0.0) @@ -187,7 +59,7 @@ none code - result = heads['BASIC'] + ('ALW' in heads and heads['ALW'] or 0.0) + ('DED' in heads and heads['DED'] or 0.0) + result = categories['BASIC'] + ('ALW' in categories and categories['ALW'] or 0.0) + ('DED' in categories and categories['DED'] or 0.0) diff --git a/addons/hr_payroll/hr_payroll_demo.xml b/addons/hr_payroll/hr_payroll_demo.xml index 24736cbb9c2..5a6ccc2c995 100644 --- a/addons/hr_payroll/hr_payroll_demo.xml +++ b/addons/hr_payroll/hr_payroll_demo.xml @@ -52,13 +52,38 @@ - code - result = worked_days['WORK100']['number_of_days'] * 1 + fix + + worked_days['WORK100']['number_of_days'] MA Meal Voucher + + + code + SALE + + Get 1% of sales + + result = (inputs['S-ASUS']['quantity'] + inputs['S-CHINA']['quantity']) * contract.wage * 0.01 + + + + + + S-ASUS + Sale to ASUStek + + + + + S-CHINA + Sale to China Export + + + diff --git a/addons/hr_payroll/hr_payroll_view.xml b/addons/hr_payroll/hr_payroll_view.xml index e1efc9d7f0c..4d422d708de 100644 --- a/addons/hr_payroll/hr_payroll_view.xml +++ b/addons/hr_payroll/hr_payroll_view.xml @@ -135,15 +135,13 @@ hr.payslip.line tree - + - - - + @@ -188,14 +186,14 @@ - - + + - + @@ -211,7 +209,7 @@ hr.payslip tree - + @@ -242,7 +240,7 @@ - + @@ -250,37 +248,21 @@
- - + + - - - - - - - - + + - - - - - - - - - -
- - - + + + @@ -290,8 +272,8 @@ - - + + @@ -299,6 +281,36 @@ +
+ + + + + + + + + +
+
+ + + + + + + + +
+ + + + + + + + +
@@ -306,6 +318,7 @@ + @@ -364,64 +377,62 @@ - - - hr.salary.head.form - hr.salary.head + + + hr.salary.rule.category.form + hr.salary.rule.category form -
+ - - +
- - hr.salary.head.tree - hr.salary.head + + + hr.salary.rule.category.tree + hr.salary.rule.category tree - + - - + - - hr.salary.head.select - hr.salary.head + + hr.salary.rule.category.select + hr.salary.rule.category search - + - - Salary Heads - hr.salary.head + + Salary Rule Categories + hr.salary.rule.category form - - + + - - + hr.salary.rule.tree hr.salary.rule tree @@ -521,85 +532,149 @@
- - hr.salary.rule.form - hr.salary.rule + + hr.salary.rule.form + hr.salary.rule + form + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + hr.salary.rule.select + hr.salary.rule + search + + + + + + + + + + + + + + + + + + Salary Rules + hr.salary.rule + form + + [('parent_rule_id','=',False)] + + + + + + + + + hr.payslip.run.search + hr.payslip.run + search + + + + + + + + + hr.payslip.run.tree + hr.payslip.run + tree + + + + + + + + + hr.payslip.run.form + hr.payslip.run form -
+ - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + +