← Back to team overview

openerp-community-reviewer team mailing list archive

[Merge] lp:~sebastien.beau/hr-timesheet/hr-timesheet-fix-project-id-not-required into lp:hr-timesheet

 

Sébastien BEAU - http://www.akretion.com has proposed merging lp:~sebastien.beau/hr-timesheet/hr-timesheet-fix-project-id-not-required into lp:hr-timesheet.

Requested reviews:
  HR Core Editors (hr-core-editors)
Related bugs:
  Bug #1333639 in HR - Timesheet Management: "Fail to create/modifiy a task if project_id is empty"
  https://bugs.launchpad.net/hr-timesheet/+bug/1333639

For more details, see:
https://code.launchpad.net/~sebastien.beau/hr-timesheet/hr-timesheet-fix-project-id-not-required/+merge/224268

Fix, by default project id is not required and can be empty
-- 
https://code.launchpad.net/~sebastien.beau/hr-timesheet/hr-timesheet-fix-project-id-not-required/+merge/224268
Your team OpenERP Community Reviewer/Maintainer is subscribed to branch lp:hr-timesheet.
=== modified file 'timesheet_task/project_task.py'
--- timesheet_task/project_task.py	2014-06-20 14:01:42 +0000
+++ timesheet_task/project_task.py	2014-06-24 10:43:31 +0000
@@ -58,9 +58,15 @@
         # project triggers on task are not called
         res = super(ProjectTask, self)._store_set_values(cr, uid, ids, fields, context=context)
         for row in self.browse(cr, SUPERUSER_ID, ids, context=context):
+<<<<<<< TREE
             if row.project_id:
                 project = row.project_id
                 project.write({'parent_id': project.parent_id.id})
+=======
+            project = row.project_id
+            if project:
+                project.write({'parent_id': project.parent_id.id})
+>>>>>>> MERGE-SOURCE
         return res
 
 


References