[FIX] project: typo in protect.task create
authorYoung Joy <github@yjmade.net>
Mon, 6 Oct 2014 03:27:55 +0000 (11:27 +0800)
committerSimon Lejeune <sle@openerp.com>
Mon, 6 Oct 2014 09:39:27 +0000 (11:39 +0200)
that typo will cause project task create error when set date_end before the time right now

addons/project/project.py

index b91c61d..6107641 100644 (file)
@@ -1048,7 +1048,7 @@ class task(osv.osv):
         if vals.get('project_id') and not context.get('default_project_id'):
             context['default_project_id'] = vals.get('project_id')
         # user_id change: update date_start
-        if vals.get('user_id') and not vals.get('start_date'):
+        if vals.get('user_id') and not vals.get('date_start'):
             vals['date_start'] = fields.datetime.now()
 
         # context: no_log, because subtype already handle this