[REVERT] account: sequence problem.
authorvra <vra@tinyerp.com>
Wed, 12 May 2010 09:49:15 +0000 (15:19 +0530)
committervra <vra@tinyerp.com>
Wed, 12 May 2010 09:49:15 +0000 (15:19 +0530)
bzr revid: vra@tinyerp.com-20100512094915-mp6q9rc51ix3dy7k

addons/account/sequence.py

index 9c566c8..e23ec1e 100644 (file)
@@ -43,8 +43,6 @@ class ir_sequence(osv.osv):
         'fiscal_ids' : fields.one2many('account.sequence.fiscalyear', 'sequence_main_id', 'Sequences')
     }
     def get_id(self, cr, uid, sequence_id, test='id', context={}):
-        if test not in ('id=%s', 'code=%s'):
-            raise ValueError('invalid test')        
         cr.execute('select id from ir_sequence where '+test+'=%s and active=%s', (sequence_id, True,))
         res = cr.dictfetchone()
         if res: