[FIX] account_analytic_plan: correctly check context
The id of the journal is passed in the context. Avoid trying to browse on jounral_id=False Fixes #821
This commit is contained in:
parent
418e06e88f
commit
e9e376a6de
|
@ -213,7 +213,7 @@ class account_analytic_plan_instance(osv.osv):
|
|||
ana_plan_instance_obj = self.pool.get('account.analytic.plan.instance')
|
||||
acct_anal_acct = self.pool.get('account.analytic.account')
|
||||
acct_anal_plan_line_obj = self.pool.get('account.analytic.plan.line')
|
||||
if context and 'journal_id' in context:
|
||||
if context and context.get('journal_id'):
|
||||
journal = journal_obj.browse(cr, uid, context['journal_id'], context=context)
|
||||
|
||||
pids = ana_plan_instance_obj.search(cr, uid, [('name','=',vals['name']), ('code','=',vals['code']), ('plan_id','<>',False)], context=context)
|
||||
|
|
Loading…
Reference in New Issue