[FIX] project, project_issue: don't use context if you didn't check it's not equal to None... stupid me

bzr revid: qdp-launchpad@openerp.com-20121228143729-x2n47tfp50uf7se8
This commit is contained in:
Quentin (OpenERP)
2012-12-28 15:37:29 +01:00
parent 175901d2cd
commit 95dd819251
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -1089,6 +1089,8 @@ class task(base_stage, osv.osv):
return True
def create(self, cr, uid, vals, context=None):
if context is None:
context = {}
if not context.get('default_project_id', False) and vals.get('project_id', False):
ctx = context.copy()
ctx['default_project_id'] = vals['project_id']
+2
View File
@@ -65,6 +65,8 @@ class project_issue(base_stage, osv.osv):
}
def create(self, cr, uid, vals, context=None):
if context is None:
context = {}
if not context.get('default_project_id', False) and vals.get('project_id', False):
ctx = context.copy()
ctx['default_project_id'] = vals['project_id']