Jalpesh Patel(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-1049499-pja into 
lp:openobject-addons.

Requested reviews:
  Atul Patel(OpenERP) (atp-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1049499-pja/+merge/123940

Hello
     i have fix bug create invoice using picking order policy ondelivery order.
     Revision ID: [email protected]
     Revision No:7424
Thanks,
pja 
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1049499-pja/+merge/123940
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-1049499-pja.
=== modified file 'stock/wizard/stock_invoice_onshipping.py'
--- stock/wizard/stock_invoice_onshipping.py	2012-07-25 10:14:28 +0000
+++ stock/wizard/stock_invoice_onshipping.py	2012-09-12 12:17:34 +0000
@@ -134,17 +134,17 @@
             onshipdata_obj[ids] = onshipdata_obj.new_picking
         context['date_inv'] = onshipdata_obj[0]['invoice_date']
         active_ids = context.get('active_ids', [])
-        active_picking = picking_pool.browse(cr, uid, context.get('active_id',False), context=context)
-        inv_type = picking_pool._get_invoice_type(active_picking)
-        context['inv_type'] = inv_type
-        if isinstance(onshipdata_obj[0]['journal_id'], tuple):
-            onshipdata_obj[0]['journal_id'] = onshipdata_obj[0]['journal_id'][0]
-        res = picking_pool.action_invoice_create(cr, uid, active_ids,
-              journal_id = onshipdata_obj[0]['journal_id'],
-              group = onshipdata_obj[0]['group'],
-              type = inv_type,
-              context=context)
-        return res
+        for  active_picking in picking_pool.browse(cr, uid, context.get('active_ids',[]), context=context):
+            inv_type = picking_pool._get_invoice_type(active_picking)
+            context['inv_type'] = inv_type
+            if isinstance(onshipdata_obj[0]['journal_id'], tuple):
+                onshipdata_obj[0]['journal_id'] = onshipdata_obj[0]['journal_id'][0]
+            res = picking_pool.action_invoice_create(cr, uid, active_ids,
+                  journal_id = onshipdata_obj[0]['journal_id'],
+                  group = onshipdata_obj[0]['group'],
+                  type = inv_type,
+                  context=context)
+            return res
 
 stock_invoice_onshipping()
 

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to