[FIX] account.move.line: write() should support ids=int, to be consistent with super.

This shortcoming was made obvious by a recent server change: 3343
revision-id: odo@openerp.com-20110205004316-zaw9qqfke1bcw0s7

bzr revid: odo@openerp.com-20110207103645-nra55tbsakl4xrd7
This commit is contained in:
Olivier Dony 2011-02-07 11:36:45 +01:00
parent 9c287abc14
commit 4a6159b376
1 changed files with 2 additions and 0 deletions

View File

@ -1130,6 +1130,8 @@ class account_move_line(osv.osv):
move_obj = self.pool.get('account.move')
account_obj = self.pool.get('account.account')
journal_obj = self.pool.get('account.journal')
if isinstance(ids, (int, long)):
ids = [ids]
if vals.get('account_tax_id', False):
raise osv.except_osv(_('Unable to change tax !'), _('You can not change the tax, you should remove and recreate lines !'))
self._check_date(cr, uid, vals, context, check)