← Back to team overview

openerp-dev-web team mailing list archive

[Merge] lp:~openerp-dev/openobject-addons/trunk-project_yml_fixes-uco into lp:openobject-addons

 

tfr (Openerp) has proposed merging lp:~openerp-dev/openobject-addons/trunk-project_yml_fixes-uco into lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-project_yml_fixes-uco/+merge/54321
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-project_yml_fixes-uco/+merge/54321
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-addons/trunk-project_yml_fixes-uco.
=== modified file 'project_long_term/wizard/project_compute_phases.py'
--- project_long_term/wizard/project_compute_phases.py	2011-03-15 15:09:12 +0000
+++ project_long_term/wizard/project_compute_phases.py	2011-03-22 11:07:39 +0000
@@ -69,7 +69,8 @@
         id = mod_obj.read(cr, uid, [result], ['res_id'])[0]['res_id']
         result = act_obj.read(cr, uid, [id], context=context)[0]
         result['target'] = 'current'
-        result['context'] = {"search_default_project_id":data['project_id'], "default_project_id":data['project_id'], "search_default_responsible_id":uid, "search_default_current": 1}
+        project_id = data.get('project_id') and data.get('project_id')[0] or False
+        result['context'] = {"search_default_project_id":project_id, "default_project_id":project_id, "search_default_responsible_id":uid, "search_default_current": 1}
         return result
 
 project_compute_phases()

=== modified file 'project_timesheet/test/worktask_entry_to_timesheetline_entry.yml'
--- project_timesheet/test/worktask_entry_to_timesheetline_entry.yml	2011-02-01 09:31:43 +0000
+++ project_timesheet/test/worktask_entry_to_timesheetline_entry.yml	2011-03-22 11:07:39 +0000
@@ -92,7 +92,7 @@
 -
   !record {model: project.task, id: project_task_getalltimesheetrecords0}:
     work_ids:
-      - date: !eval time.strftime('%Y-07-%d %H:%M:%S')
+      - date: !eval time.strftime('%Y-06-%d %H:%M:%S')
         hours: 10.0
         name: Get work calendar of all employees
         user_id: res_users_hrmanager0

=== modified file 'resource/resource.py'
--- resource/resource.py	2011-01-14 09:34:28 +0000
+++ resource/resource.py	2011-03-22 11:07:39 +0000
@@ -258,18 +258,17 @@
             leaves = []
             resource_eff = 1.0
             if resource_ids:
-                resource_id = resource_ids[0]    
-                resource = self.browse(cr, uid, resource_id, context=context)
-                resource_eff = resource.time_efficiency
-                resource_cal = resource.calendar_id.id
-                if resource_cal:
-                    leaves = self.compute_vacation(cr, uid, calendar_id, resource.id, resource_cal, context=context)
-                temp = {
-                         'name' : resource.name,
-                         'vacation': tuple(leaves),
-                         'efficiency': resource_eff,
-                      }
-                resource_objs[resource_id] = temp     
+                for resource in self.browse(cr, uid, resource_ids, context=context):
+                    resource_eff = resource.time_efficiency
+                    resource_cal = resource.calendar_id.id
+                    if resource_cal:
+                        leaves = self.compute_vacation(cr, uid, calendar_id, resource.id, resource_cal, context=context)
+                    temp = {
+                             'name' : resource.name,
+                             'vacation': tuple(leaves),
+                             'efficiency': resource_eff,
+                          }
+                    resource_objs[resource.id] = temp     
 #            resource_objs.append(classobj(str(user.name), (Resource,),{
 #                                             '__doc__': user.name,
 #                                             '__name__': user.name,


Follow ups