[FIX] l10_be_invoice_bba: make invoice.write() more lenient with ORM API

bzr revid: odo@openerp.com-20110819144252-gz0ff9mg598778uv
This commit is contained in:
Olivier Dony 2011-08-19 16:42:52 +02:00
parent c88c35ce80
commit fb59f1098f
1 changed files with 2 additions and 0 deletions

View File

@ -180,6 +180,8 @@ class account_invoice(osv.osv):
return super(account_invoice, self).create(cr, uid, vals, context=context)
def write(self, cr, uid, ids, vals, context={}):
if isinstance(ids, (int, long)):
ids = [ids]
for inv in self.browse(cr, uid, ids, context):
if vals.has_key('reference_type'):
reference_type = vals['reference_type']