[IMP] account : converted ids into list of idsin write method of account.journal

lp bug: https://launchpad.net/bugs/800693 fixed

bzr revid: bde@tiny2-desktop-20110630103918-lw61ms8hxs7ypkc3
This commit is contained in:
Guewen Baconnier 2011-06-30 16:09:18 +05:30 committed by bde
parent 05c283a6ea
commit c41f13b447
1 changed files with 2 additions and 0 deletions

View File

@ -650,6 +650,8 @@ class account_journal(osv.osv):
def write(self, cr, uid, ids, vals, context=None):
if context is None:
context = {}
if isinstance(ids, (int, long)):
ids = [ids]
for journal in self.browse(cr, uid, ids, context=context):
if 'company_id' in vals and journal.company_id.id != vals['company_id']:
move_lines = self.pool.get('account.move.line').search(cr, uid, [('journal_id', 'in', ids)])