[FIX] project: projects_ids default value must be an array or none, not a lonely integer

bzr revid: dle@openerp.com-20140113113015-fobrv940bjhw1g7z
This commit is contained in:
Denis Ledoux 2014-01-13 12:30:15 +01:00
parent 74e0fbae83
commit 9a93675d2d
1 changed files with 7 additions and 1 deletions

View File

@ -46,9 +46,15 @@ class project_task_type(osv.osv):
'there are no records in that stage to display.'),
}
def _get_default_project_ids(self, cr, uid, ctx={}):
project_id = self.pool['project.task']._get_default_project_id(cr, uid, context=ctx)
if project_id:
return [project_id]
return None
_defaults = {
'sequence': 1,
'project_ids': lambda self, cr, uid, ctx=None: self.pool['project.task']._get_default_project_id(cr, uid, context=ctx),
'project_ids': _get_default_project_ids,
}
_order = 'sequence'