commit
5646ed0006
|
@ -44,7 +44,7 @@ class stock_invoice_onshipping(osv.osv_memory):
|
||||||
res_ids = context and context.get('active_ids', [])
|
res_ids = context and context.get('active_ids', [])
|
||||||
vals = []
|
vals = []
|
||||||
browse_picking = model_pool.browse(cr, uid, res_ids, context=context)
|
browse_picking = model_pool.browse(cr, uid, res_ids, context=context)
|
||||||
|
|
||||||
for pick in browse_picking:
|
for pick in browse_picking:
|
||||||
src_usage = pick.move_lines[0].location_id.usage
|
src_usage = pick.move_lines[0].location_id.usage
|
||||||
dest_usage = pick.move_lines[0].location_dest_id.usage
|
dest_usage = pick.move_lines[0].location_dest_id.usage
|
||||||
|
@ -59,7 +59,7 @@ class stock_invoice_onshipping(osv.osv_memory):
|
||||||
journal_type = 'sale_refund'
|
journal_type = 'sale_refund'
|
||||||
else:
|
else:
|
||||||
journal_type = 'sale'
|
journal_type = 'sale'
|
||||||
|
|
||||||
value = journal_obj.search(cr, uid, [('type', '=',journal_type )])
|
value = journal_obj.search(cr, uid, [('type', '=',journal_type )])
|
||||||
for jr_type in journal_obj.browse(cr, uid, value, context=context):
|
for jr_type in journal_obj.browse(cr, uid, value, context=context):
|
||||||
t1 = jr_type.id,jr_type.name
|
t1 = jr_type.id,jr_type.name
|
||||||
|
@ -140,7 +140,7 @@ class stock_invoice_onshipping(osv.osv_memory):
|
||||||
res = picking_pool.action_invoice_create(cr, uid, active_ids,
|
res = picking_pool.action_invoice_create(cr, uid, active_ids,
|
||||||
journal_id = onshipdata_obj[0]['journal_id'],
|
journal_id = onshipdata_obj[0]['journal_id'],
|
||||||
group = onshipdata_obj[0]['group'],
|
group = onshipdata_obj[0]['group'],
|
||||||
type = None,
|
type = inv_type,
|
||||||
context=context)
|
context=context)
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue