[FIX] stock: Accounting entries from goods receipt now broken
authorGraeme Gellatly (gdgellatly) <>
Thu, 21 Jul 2011 06:31:39 +0000 (12:01 +0530)
committerpsi (Open ERP) <psi@tinyerp.co.in>
Thu, 21 Jul 2011 06:31:39 +0000 (12:01 +0530)
lp bug: https://launchpad.net/bugs/797477 fixed

bzr revid: psi@tinyerp.co.in-20110721063139-383nbh9v2elp407x

addons/stock/wizard/stock_invoice_onshipping.py

index 42add80..06951a7 100644 (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