[FIX] account journal create sequence with company_id
authorAntony Lesuisse <al@openerp.com>
Wed, 31 Aug 2011 15:16:17 +0000 (17:16 +0200)
committerAntony Lesuisse <al@openerp.com>
Wed, 31 Aug 2011 15:16:17 +0000 (17:16 +0200)
bzr revid: al@openerp.com-20110831151617-goq19llee5iajmb8

addons/account/account.py

index 50a90b4..39e680f 100644 (file)
@@ -660,11 +660,6 @@ class account_journal(osv.osv):
     def create_sequence(self, cr, uid, vals, context=None):
         """
         Create new entry sequence for every new Joural
-        @param cr: cursor to database
-        @param user: id of current user
-        @param ids: list of record ids to be process
-        @param context: context arguments, like lang, time zone
-        @return: return a result
         """
         seq_pool = self.pool.get('ir.sequence')
         seq_typ_pool = self.pool.get('ir.sequence.type')
@@ -686,6 +681,8 @@ class account_journal(osv.osv):
             'padding': 4,
             'number_increment': 1
         }
+        if 'company_id' in vals:
+            seq['company_id'] = vals['company_id']
         return seq_pool.create(cr, uid, seq)
 
     def create(self, cr, uid, vals, context=None):