From f7c4222fbfc01820f53ef5ce98d58deb177f7c3a Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Mon, 13 Sep 2010 17:52:27 +0530 Subject: [PATCH] [REF] bzr revid: mra@mra-laptop-20100913122227-6t7s8jcj56wcjw59 --- addons/account/account.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index ee9e2e09582..e60f9c4276c 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -1537,9 +1537,9 @@ class account_tax_code(osv.osv): if context is None: context = {} move_state = ('posted', ) - if 'state' in context and context['state'] == 'all': + if context.get('state', False) == 'all': move_state = ('draft', 'posted', ) - if 'fiscalyear_id' in context and context['fiscalyear_id']: + if context.get('fiscalyear_id', False): fiscalyear_id = context['fiscalyear_id'] else: fiscalyear_id = self.pool.get('account.fiscalyear').find(cr, uid, exception=False) @@ -1557,9 +1557,9 @@ class account_tax_code(osv.osv): if context is None: context = {} move_state = ('posted', ) - if 'state' in context and context['state'] == 'all': + if context.get('state', False) == 'all': move_state = ('draft', 'posted', ) - if 'period_id' in context and context['period_id']: + if context.get('period_id', False): period_id = context['period_id'] else: period_id = self.pool.get('account.period').find(cr, uid)