[FIX] Should have browse record of sale order instead of id

bzr revid: jco@openerp.com-20130320135321-ckejagpme57sq51z
This commit is contained in:
Josse Colpaert 2013-03-20 14:53:21 +01:00
parent d90170fae5
commit 9913357fa2
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ class sale_make_invoice(osv.osv_memory):
if context is None:
context = {}
data = self.read(cr, uid, ids)[0]
for sale_order in context.get(('active_ids'), []):
for sale_order in order_obj.browse(cr, uid, context.get(('active_ids'), []), context=context):
if sale_order.state != 'manual':
raise osv.except_osv(_('Warning!'), "You shouldn't manually invoice the following sale order %s" % (sale_order.name))