From d3b8950f40fde3d039b479a0c74f27c60b5d41f6 Mon Sep 17 00:00:00 2001 From: bch <> Date: Wed, 1 Aug 2007 14:00:37 +0000 Subject: [PATCH] ACCOUNT: use the argument obj instead of the harcoded 'l' as table alias in _query_get function bzr revid: bch-2c71e24dea63d530fbd89478a023894a28b2f15f --- addons/account/account_move_line.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index 5901b4ce8b4..bb3b3457637 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -42,9 +42,9 @@ class account_move_line(osv.osv): context['fiscalyear'] = self.pool.get('account.fiscalyear').find(cr, uid, exception=False) if context.get('periods', False): ids = ','.join([str(x) for x in context['periods']]) - return "l.active AND l.state<>'draft' AND l.period_id in (SELECT id from account_period WHERE fiscalyear_id=%d AND id in (%s))" % (context['fiscalyear'], ids) + return obj+".active AND "+obj+".state<>'draft' AND "+obj+".period_id in (SELECT id from account_period WHERE fiscalyear_id=%d AND id in (%s))" % (context['fiscalyear'], ids) else: - return "l.active AND l.state<>'draft' AND l.period_id in (SELECT id from account_period WHERE fiscalyear_id=%d)" % (context['fiscalyear'],) + return obj+".active AND "+obj+".state<>'draft' AND "+obj+".period_id in (SELECT id from account_period WHERE fiscalyear_id=%d)" % (context['fiscalyear'],) def default_get(self, cr, uid, fields, context={}): data = self._default_get(cr, uid, fields, context)