From 352ab7c51b3f5e70b48ab5b0dca39ca047f485ee Mon Sep 17 00:00:00 2001 From: chafique-delli Date: Fri, 29 Jan 2016 17:47:03 +0100 Subject: [PATCH] [FIX] account: add missing context Closes #10691 --- addons/account/account.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/account.py b/addons/account/account.py index e1d41fe919e..824751a9a2e 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -2598,7 +2598,7 @@ class account_account_template(osv.osv): children_acc_criteria = [('chart_template_id','=', chart_template_id)] if template.account_root_id.id: children_acc_criteria = ['|'] + children_acc_criteria + ['&',('parent_id','child_of', [template.account_root_id.id]),('chart_template_id','=', False)] - children_acc_template = self.search(cr, uid, [('nocreate','!=',True)] + children_acc_criteria, order='id') + children_acc_template = self.search(cr, uid, [('nocreate','!=',True)] + children_acc_criteria, order='id', context=context) for account_template in self.browse(cr, uid, children_acc_template, context=context): # skip the root of COA if it's not the main one if (template.account_root_id.id == account_template.id) and template.parent_id: