diff --git a/addons/caldav/caldav.py b/addons/caldav/caldav.py index 48f845176d4..3afcc28dd40 100644 --- a/addons/caldav/caldav.py +++ b/addons/caldav/caldav.py @@ -192,7 +192,12 @@ class CalDAV(object): vals = alarm.import_cal(cr, uid, cal_data, context=ctx) self.ical_set(cal_data.name.lower(), vals, 'value') continue + if cal_data.name.lower() == 'exdate': + exval = map(lambda x: str(x), cal_data.value) + self.ical_set(cal_data.name.lower(), ','.join(exval), 'value') + continue if cal_data.name.lower() in self.__attribute__: + if cal_data.params.get('X-VOBJ-ORIGINAL-TZID'): self.ical_set('vtimezone', cal_data.params.get('X-VOBJ-ORIGINAL-TZID'), 'value') self.ical_set(cal_data.name.lower(), cal_data.value, 'value') diff --git a/addons/hr/hr_view.xml b/addons/hr/hr_view.xml index fdc55999297..907d2bdbb76 100644 --- a/addons/hr/hr_view.xml +++ b/addons/hr/hr_view.xml @@ -377,11 +377,10 @@ tree,form - + parent="menu_hr_root"/> diff --git a/addons/hr_evaluation/hr_evaluation.py b/addons/hr_evaluation/hr_evaluation.py index 41056d70dbc..2166fab0093 100644 --- a/addons/hr_evaluation/hr_evaluation.py +++ b/addons/hr_evaluation/hr_evaluation.py @@ -21,6 +21,7 @@ import time from osv import fields, osv +from mx import DateTime as dt class hr_evaluation_plan(osv.osv): _name = "hr_evaluation.plan" @@ -75,13 +76,36 @@ class hr_employee(osv.osv): _inherit="hr.employee" _columns = { 'evaluation_plan_id': fields.many2one('hr_evaluation.plan', 'Evaluation Plan'), - 'evaluation_date': fields.date('Next Evaluation', help="Date of the next evaluation"), + 'evaluation_date': fields.date('Next Evaluation', help="Date of the next evaluation",readonly=True), } - def onchange_evaluation_plan_id(self, *args): - # return the right evaluation date - pass + + def onchange_evaluation_plan_id(self,cr,uid,ids,evaluation_plan_id,context={}): + evaluation_date = self.browse(cr, uid, ids)[0].evaluation_date or '' + evaluation_plan_obj=self.pool.get('hr_evaluation.plan') + if evaluation_plan_id: + for evaluation_plan in evaluation_plan_obj.browse(cr,uid,[evaluation_plan_id]): + if not evaluation_date: + evaluation_date=(dt.ISO.ParseAny(dt.now().strftime('%Y-%m-%d'))+ dt.RelativeDateTime(months=+evaluation_plan.month_first)).strftime('%Y-%m-%d') + else: + evaluation_date=(dt.ISO.ParseAny(evaluation_date)+ dt.RelativeDateTime(months=+evaluation_plan.month_next)).strftime('%Y-%m-%d') + return {'value': {'evaluation_date':evaluation_date}} hr_employee() +class hr_evaluation_interview(osv.osv): + _name = "hr.evaluation.interview" + _inherit = "survey.request" + + def default_get(self, cr, uid, fields, context={}): + data = super(hr_evaluation_interview, self).default_get(cr, uid, fields, context) + if context.has_key('phase_id'): + data['survey_id'] =self.pool.get('hr_evaluation.plan.phase').browse(cr, uid, context['phase_id']).survey_id.id + return data + + _columns = { + 'user_to_review_id': fields.many2one('hr.employee', 'Employee'), + } +hr_evaluation_interview() + class hr_evaluation(osv.osv): _name = "hr_evaluation.evaluation" _description = "Employee Evaluation" @@ -89,7 +113,6 @@ class hr_evaluation(osv.osv): _columns = { 'date': fields.date("Evaluation Deadline", required=True), 'employee_id': fields.many2one('hr.employee', "Employee", required=True), - 'manager_id': fields.many2one('res.users', "Manager", required=True), 'note_summary': fields.text('Evaluation Summary'), 'note_action': fields.text('Action Plan', help="If the evaluation does not meet the expectations, you can propose"+ @@ -101,7 +124,7 @@ class hr_evaluation(osv.osv): ('3','Exceeds expectations'), ('4','Significantly exceeds expectations'), ], "Overall Rating", help="This is the overall rating on that summarize the evaluation"), - 'survey_request_ids': fields.many2many('survey.request', + 'survey_request_ids': fields.many2many('hr.evaluation.interview', 'hr_evaluation_evaluation_requests', 'evaluation_id', 'survey_id', @@ -139,4 +162,3 @@ class hr_evaluation(osv.osv): hr_evaluation() - diff --git a/addons/hr_evaluation/hr_evaluation_data.xml b/addons/hr_evaluation/hr_evaluation_data.xml index 3e0b6137c7d..372b40a95f7 100644 --- a/addons/hr_evaluation/hr_evaluation_data.xml +++ b/addons/hr_evaluation/hr_evaluation_data.xml @@ -1577,13 +1577,23 @@ Once the form had been filled, the employee send it to his supervisor. + + + + waiting_answer + + + fp@tinyerp.com + 2010-02-21 + + 0 draft - + 2010-01-21 diff --git a/addons/hr_evaluation/hr_evaluation_view.xml b/addons/hr_evaluation/hr_evaluation_view.xml index 58aa5f4a3fc..0a288e34078 100644 --- a/addons/hr_evaluation/hr_evaluation_view.xml +++ b/addons/hr_evaluation/hr_evaluation_view.xml @@ -106,7 +106,7 @@ - + @@ -123,13 +123,12 @@ - - + @@ -169,7 +168,6 @@ - @@ -182,5 +180,70 @@ name="Evaluation" parent="menu_eval_hr" id="menu_open_view_hr_evaluation_tree" action="open_view_hr_evaluation_tree"/> + + + + hr_evaluation.interview.form + hr.evaluation.interview + form + +
+ + + +