[FIX] stock: Accounting entries from goods receipt now broken

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

bzr revid: psi@tinyerp.co.in-20110721063139-383nbh9v2elp407x
This commit is contained in:
Graeme Gellatly (gdgellatly) 2011-07-21 12:01:39 +05:30 committed by psi (Open ERP)
parent d844fd133b
commit 97b38de7c5
1 changed files with 3 additions and 3 deletions

View File

@ -38,7 +38,7 @@ class stock_invoice_onshipping(osv.osv_memory):
res_ids = context and context.get('active_ids', [])
vals = []
browse_picking = model_pool.browse(cr, uid, res_ids, context=context)
for pick in browse_picking:
src_usage = pick.move_lines[0].location_id.usage
dest_usage = pick.move_lines[0].location_dest_id.usage
@ -53,7 +53,7 @@ class stock_invoice_onshipping(osv.osv_memory):
journal_type = 'sale_refund'
else:
journal_type = 'sale'
value = journal_obj.search(cr, uid, [('type', '=',journal_type )])
for jr_type in journal_obj.browse(cr, uid, value, context=context):
t1 = jr_type.id,jr_type.name
@ -129,7 +129,7 @@ class stock_invoice_onshipping(osv.osv_memory):
res = picking_pool.action_invoice_create(cr, uid, active_ids,
journal_id = onshipdata_obj[0]['journal_id'],
group = onshipdata_obj[0]['group'],
type = None,
type = inv_type,
context=context)
return res