diff --git a/addons/audittrail/audittrail.py b/addons/audittrail/audittrail.py index 4278e0a9179..dd843449c8c 100644 --- a/addons/audittrail/audittrail.py +++ b/addons/audittrail/audittrail.py @@ -35,15 +35,15 @@ class audittrail_rule(osv.osv): _description = "Audittrail Rule" _columns = { "name": fields.char("Rule Name", size=32, required=True), - "object_id": fields.many2one('ir.model', 'Object', required=True), + "object_id": fields.many2one('ir.model', 'Object', required=True, help="Select object for which you want to generate log."), "user_id": fields.many2many('res.users', 'audittail_rules_users', 'user_id', 'rule_id', 'Users', help="if User is not added then it will applicable for all users"), - "log_read": fields.boolean("Log Reads"), - "log_write": fields.boolean("Log Writes"), - "log_unlink": fields.boolean("Log Deletes"), - "log_create": fields.boolean("Log Creates"), - "log_action": fields.boolean("Log Action"), - "log_workflow": fields.boolean("Log Workflow"), + "log_read": fields.boolean("Log Reads", help="Select this if you want to keep track of read/open on any record of the object of this rule"), + "log_write": fields.boolean("Log Writes", help="Select this if you want to keep track of modification on any record of the object of this rule"), + "log_unlink": fields.boolean("Log Deletes", help="Select this if you want to keep track of deletion on any record of the object of this rule"), + "log_create": fields.boolean("Log Creates",help="Select this if you want to keep track of creation on any record of the object of this rule"), + "log_action": fields.boolean("Log Action",help="Select this if you want to keep track of actions on the object of this rule"), + "log_workflow": fields.boolean("Log Workflow",help="Select this if you want to keep track of workflow on any record of the object of this rule"), "state": fields.selection((("draft", "Draft"), ("subscribed", "Subscribed")), "State", required=True), diff --git a/addons/hr/__openerp__.py b/addons/hr/__openerp__.py index 70c91fbe362..0aa26987aa5 100755 --- a/addons/hr/__openerp__.py +++ b/addons/hr/__openerp__.py @@ -44,6 +44,7 @@ 'hr_installer.xml', 'hr_data.xml', 'board_hr_view.xml', + 'board_hr_manager_view.xml', ], 'demo_xml': [ 'hr_demo.xml', @@ -54,4 +55,4 @@ 'active': False, 'certificate': '0086710558965', } -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr/board_hr_manager_view.xml b/addons/hr/board_hr_manager_view.xml new file mode 100644 index 00000000000..3cfaf165840 --- /dev/null +++ b/addons/hr/board_hr_manager_view.xml @@ -0,0 +1,31 @@ + + + + + + + board.hr.manager.form + board.board + form + +
+ + + + + + +
+
+
+ + + HR Manager Dashboard + board.board + form + form + menu + + +
+
diff --git a/addons/hr/hr.py b/addons/hr/hr.py index 95355d7c303..9ce0b535401 100644 --- a/addons/hr/hr.py +++ b/addons/hr/hr.py @@ -107,10 +107,10 @@ class hr_employee(osv.osv): _inherits = {'resource.resource': "resource_id"} _columns = { 'country_id': fields.many2one('res.country', 'Nationality'), - 'birthday': fields.date("Birthday"), + 'birthday': fields.date("Date of Birth"), 'ssnid': fields.char('SSN No', size=32, help='Social Security Number'), 'sinid': fields.char('SIN No', size=32, help="Social Insurance Number"), - 'otherid': fields.char('Other ID', size=32), + 'identification_id': fields.char('Identification No', size=32), 'gender': fields.selection([('male', 'Male'),('female', 'Female')], 'Gender'), 'marital': fields.many2one('hr.employee.marital.status', 'Marital Status'), 'bank_account': fields.char('Bank Account', size=64), @@ -119,10 +119,10 @@ class hr_employee(osv.osv): 'address_id': fields.many2one('res.partner.address', 'Working Address'), 'address_home_id': fields.many2one('res.partner.address', 'Home Address'), 'work_phone': fields.related('address_id', 'phone', type='char', string='Work Phone', readonly=True), - 'work_email': fields.related('address_id', 'email', type='char', size=240, string='Work E-mail', readonly=True), + 'work_email': fields.related('address_id', 'email', type='char', size=240, string='Work E-mail'), 'work_location': fields.char('Office Location', size=32), 'notes': fields.text('Notes'), - 'parent_id': fields.related('department_id', 'manager_id', relation='hr.employee', string='Manager', type='many2one', store=True, select=True), + 'parent_id': fields.related('department_id', 'manager_id', relation='hr.employee', string='Manager', type='many2one', store=True, select=True, readonly=True, help="It is linked with manager of Department"), 'category_ids': fields.many2many('hr.employee.category', 'employee_category_rel','category_id','emp_id','Category'), 'child_ids': fields.one2many('hr.employee', 'parent_id', 'Subordinates'), 'resource_id': fields.many2one('resource.resource', 'Resource', ondelete='cascade', required=True), @@ -131,14 +131,29 @@ class hr_employee(osv.osv): 'photo': fields.binary('Photo') } + def onchange_company(self, cr, uid, ids, company, context=None): + company_id = self.pool.get('res.company').browse(cr,uid,company) + for address in company_id.partner_id.address: + return {'value': {'address_id': address.id}} + return {'value':{}} + + def onchange_department(self, cr, uid, ids, department_id, context=None): + manager = self.pool.get('hr.department').browse(cr, uid, department_id).manager_id.id + return {'value': {'parent_id':manager or False}} + + def onchange_user(self, cr, uid, ids, user_id, context=None): + mail = self.pool.get('res.users').browse(cr,uid,user_id) + return {'value': {'work_email':mail.user_email}} + def _get_photo(self, cr, uid, context=None): return open(os.path.join( tools.config['addons_path'], 'hr/image', 'photo.png'), 'rb') .read().encode('base64') - + _defaults = { 'active': 1, 'photo': _get_photo, + 'address_id': lambda self,cr,uid,c: self.pool.get('res.partner.address').browse(cr, uid, uid, c).partner_id.id } def _check_recursion(self, cr, uid, ids, context=None): @@ -174,4 +189,4 @@ class hr_department(osv.osv): hr_department() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr/hr_department_view.xml b/addons/hr/hr_department_view.xml index 7626c501167..23ae3a9d7e3 100644 --- a/addons/hr/hr_department_view.xml +++ b/addons/hr/hr_department_view.xml @@ -14,9 +14,9 @@
- + - + diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml index 250f47b2055..7d2cec69667 100644 --- a/addons/hr/hr_view.xml +++ b/addons/hr/hr_view.xml @@ -22,12 +22,12 @@ - - + + + - @@ -39,7 +39,7 @@ - + @@ -59,8 +59,8 @@ - - + + @@ -83,7 +83,8 @@ - + + @@ -98,7 +99,7 @@ search - + @@ -113,6 +114,7 @@ + @@ -148,7 +150,7 @@ The employee directory contains all data related to your employees: from their photo up to their hourly estimated costs for the timesheets. Employees are managed by departments and can be linked to users to manage their access rights. - + + + Employee + + + + Worker + + + + Subcontractor + diff --git a/addons/hr_contract/hr_contract_view.xml b/addons/hr_contract/hr_contract_view.xml index c049d92a783..cb486df91b1 100644 --- a/addons/hr_contract/hr_contract_view.xml +++ b/addons/hr_contract/hr_contract_view.xml @@ -49,7 +49,7 @@ - Contract Wage Type + Wage Type hr.contract.wage.type form tree,form @@ -58,7 +58,7 @@ - + hr.contract.wage.type.period.view.form @@ -101,7 +101,7 @@ hr.employee - + @@ -133,7 +133,7 @@ form - + @@ -154,8 +154,11 @@ - + + @@ -182,7 +185,10 @@ - + + + + @@ -205,13 +211,14 @@ + + - - - + + @@ -268,8 +275,8 @@ - - + + diff --git a/addons/hr_contract/security/ir.model.access.csv b/addons/hr_contract/security/ir.model.access.csv index 7db79a1de7f..9ed14b14755 100644 --- a/addons/hr_contract/security/ir.model.access.csv +++ b/addons/hr_contract/security/ir.model.access.csv @@ -12,7 +12,9 @@ "access_hr_contract_wage_type_system","hr.contract.wage.type.system","model_hr_contract_wage_type","base.group_system",1,1,1,1 "access_hr_contract_wage_type_period_system","hr.contract.wage.type.period.system","model_hr_contract_wage_type_period","base.group_system",1,1,1,1 "access_hr_contract_type_system","hr.contract.type.system","model_hr_contract_type","base.group_system",1,1,1,1 -"access_hr_contract_system","hr.contract.system","model_hr_contract","base.group_system",1,0,0,0 +"access_hr_contract_system","hr.contract.system","model_hr_contract","base.group_system",1,1,1,1 "access_hr_employee_category_contract","hr.employee.category.contract","hr.model_hr_employee_category","base.group_hr_contract",1,1,1,1 "access_hr_department_contract","hr.department.contract","hr.model_hr_department","base.group_hr_contract",1,1,1,1 -"access_hr_contract_manager","hr.contract.manager","model_hr_contract","base.group_hr_manager",1,0,0,0 +"access_hr_contract_manager","hr.contract.manager","model_hr_contract","base.group_hr_manager",1,1,1,1 +"access_hr_contract_employee","hr.contract.employee","model_hr_contract","base.group_user",1,0,0,0 +"access_hr_contract_type_manager","hr.contract.type.manager","model_hr_contract_type","base.group_hr_manager",1,1,1,1 diff --git a/addons/hr_contract/test/test_hr_contract.yml b/addons/hr_contract/test/test_hr_contract.yml index 084e45620a4..e5ecc57f144 100644 --- a/addons/hr_contract/test/test_hr_contract.yml +++ b/addons/hr_contract/test/test_hr_contract.yml @@ -41,7 +41,10 @@ advantages_net: 0.0 date_end: '2011-05-18' date_start: '2010-05-18' + trial_date_end: '2010-03-01' + trial_date_start: '2010-04-30' name: contract1 wage: 1.0 wage_type_id: hr_contract_wage_type_monthlygrosswage0 + type_id: hr_contract_type_emp working_hours: resource.timesheet_group1 diff --git a/addons/hr_evaluation/__openerp__.py b/addons/hr_evaluation/__openerp__.py index b28c6d4e913..9db64bbb27c 100644 --- a/addons/hr_evaluation/__openerp__.py +++ b/addons/hr_evaluation/__openerp__.py @@ -33,7 +33,7 @@ in which various surveys can be created and it can be defined which level of employee hierarchy fills what and final review and evaluation is done by the manager.Every evaluation filled by the employees can be viewed - in the form of.Implements a dashboard for My Current Evaluations + in the form of.Implements a dashboard for My Current Evaluations """, "init_xml": [], "demo_xml": ["hr_evaluation_demo.xml", @@ -43,7 +43,8 @@ "security/hr_evaluation_security.xml", "wizard/hr_evaluation_mail_view.xml", "hr_evaluation_view.xml", - "report/hr_evaluation_report_view.xml" + "report/hr_evaluation_report_view.xml", + "board_hr_evaluation_view.xml" ], "test": ["test/test_hr_evaluation.yml"], "active": False, diff --git a/addons/hr_evaluation/board_hr_evaluation_view.xml b/addons/hr_evaluation/board_hr_evaluation_view.xml index 7822c0d3111..5a67fe1945d 100644 --- a/addons/hr_evaluation/board_hr_evaluation_view.xml +++ b/addons/hr_evaluation/board_hr_evaluation_view.xml @@ -2,12 +2,12 @@ - My Current Evaluations + My Evaluation Remaining ir.actions.act_window hr_evaluation.evaluation form - [('state','!=','done'),('create_uid','=',uid)] + [('state','in',('wait', 'progress')),('create_uid','=',uid)] @@ -18,9 +18,15 @@ form - + + diff --git a/addons/hr_evaluation/hr_evaluation.py b/addons/hr_evaluation/hr_evaluation.py index c80c12f10ff..263b34322b9 100644 --- a/addons/hr_evaluation/hr_evaluation.py +++ b/addons/hr_evaluation/hr_evaluation.py @@ -34,7 +34,7 @@ class hr_evaluation_plan(osv.osv): 'company_id': fields.many2one('res.company', 'Company', required=True), 'phase_ids': fields.one2many('hr_evaluation.plan.phase', 'plan_id', 'Evaluation Phases'), 'month_first': fields.integer('First Evaluation After'), - 'month_next': fields.integer('Next Evaluation After'), + 'month_next': fields.integer('After the Date of Start'), 'active': fields.boolean('Active') } _defaults = { @@ -67,10 +67,10 @@ class hr_evaluation_plan_phase(osv.osv): 'send_anonymous_employee': fields.boolean('Anonymous Summary', help="Send an anonymous summary to the employee"), 'wait': fields.boolean('Wait Previous Phases', - help="Check this box if you want to wait that all preceeding phases " + + help="Check this box if you want to wait that all preceding phases " + "are finished before launching this phase."), 'mail_feature': fields.boolean('Send mail for this phase', help="Check this box if you want to send mail to employees"+ - "coming under this phase"), + " coming under this phase"), 'mail_body': fields.text('Email'), 'email_subject':fields.text('char') } @@ -161,13 +161,13 @@ class hr_evaluation(osv.osv): ('2','Meet expectations'), ('3','Exceeds expectations'), ('4','Significantly exceeds expectations'), - ], "Overall Rating", help="This is the overall rating on that summarize the evaluation"), + ], "Appreciation", help="This is the appreciation on that summarize the evaluation"), 'survey_request_ids': fields.one2many('hr.evaluation.interview','evaluation_id','Appraisal Forms'), 'plan_id': fields.many2one('hr_evaluation.plan', 'Plan', required=True), 'state': fields.selection([ ('draft','Draft'), ('wait','Plan In Progress'), - ('progress','Final Validation'), + ('progress','Waiting Appreciation'), ('done','Done'), ('cancel','Cancelled'), ], 'State', required=True, readonly=True), @@ -220,8 +220,8 @@ class hr_evaluation(osv.osv): elif phase.action == "self": childs = [evaluation.employee_id] for child in childs: - if not child.user_id: - continue +# if not child.user_id: +# continue int_id = hr_eval_inter_obj.create(cr, uid, { 'evaluation_id': evaluation.id, @@ -284,6 +284,7 @@ survey_request() class hr_evaluation_interview(osv.osv): _name = 'hr.evaluation.interview' _inherits = {'survey.request': 'request_id'} + _rec_name = 'request_id' _description = 'Evaluation Interview' _columns = { 'request_id': fields.many2one('survey.request','Request_id', ondelete='cascade', required=True), @@ -293,7 +294,19 @@ class hr_evaluation_interview(osv.osv): _defaults = { 'is_evaluation': True, } - + + def name_get(self, cr, uid, ids, context=None): + if context is None: + context = {} + if not len(ids): + return [] + reads = self.browse(cr, uid, ids, context=context) + res = [] + for record in reads: + name = record.request_id.survey_id.title + res.append((record['id'], name)) + return res + def survey_req_waiting_answer(self, cr, uid, ids, context=None): if context is None: context = {} diff --git a/addons/hr_evaluation/hr_evaluation_demo.xml b/addons/hr_evaluation/hr_evaluation_demo.xml index eaad7d3865d..0a03ec0e0b6 100644 --- a/addons/hr_evaluation/hr_evaluation_demo.xml +++ b/addons/hr_evaluation/hr_evaluation_demo.xml @@ -9,6 +9,7 @@ 5 + open @@ -1610,6 +1611,19 @@ Once the form had been filled, the employee send it to his supervisor. + + + Employee Evaluation + + [('employee_id.user_id','=',user.id)] + + + + Manager Evaluation + + ['|',('employee_id.user_id','=',user.id),('employee_id.parent_id.user_id','=',user.id )] + + diff --git a/addons/hr_evaluation/hr_evaluation_view.xml b/addons/hr_evaluation/hr_evaluation_view.xml index 55bc22ac505..9ec02b4ad0b 100644 --- a/addons/hr_evaluation/hr_evaluation_view.xml +++ b/addons/hr_evaluation/hr_evaluation_view.xml @@ -26,13 +26,14 @@ form - + - @@ -72,7 +73,7 @@ hr_evaluation.plan.phase form - + @@ -84,7 +85,7 @@ - + @@ -125,7 +126,7 @@ hr_evaluation.plan.phase tree - + @@ -184,7 +185,7 @@