← Back to team overview

savoirfairelinux-openerp team mailing list archive

lp:~sebastien.beau/e-commerce-addons/e-commerce-addons-fix-picking-export into lp:e-commerce-addons

 

Sébastien BEAU - http://www.akretion.com has proposed merging lp:~sebastien.beau/e-commerce-addons/e-commerce-addons-fix-picking-export into lp:e-commerce-addons.

Requested reviews:
  Guewen Baconnier @ Camptocamp (gbaconnier-c2c)

For more details, see:
https://code.launchpad.net/~sebastien.beau/e-commerce-addons/e-commerce-addons-fix-picking-export/+merge/154172

My customer just export the picking from the wizard import/export of openerp and then the picking was not exporting to magento. Indeed the SQL request was wrong, so I fix it.
-- 
https://code.launchpad.net/~sebastien.beau/e-commerce-addons/e-commerce-addons-fix-picking-export/+merge/154172
Your team extra-addons-commiter is subscribed to branch lp:e-commerce-addons.
=== modified file 'base_sale_multichannels/sale.py'
--- base_sale_multichannels/sale.py	2013-01-14 07:40:50 +0000
+++ base_sale_multichannels/sale.py	2013-03-19 18:48:19 +0000
@@ -402,7 +402,10 @@
         LEFT JOIN delivery_carrier
                   ON delivery_carrier.id = stock_picking.carrier_id
         WHERE sale_order.shop_id = %(shop_id)s
-              AND ir_model_data.res_id ISNULL
+              AND (
+                  ir_model_data.referential_id is Null
+                  OR ir_model_data.referential_id != %(referential_id)s
+              )
               AND stock_picking.state = 'done'
               AND stock_picking.type = 'out'
               AND NOT stock_picking.do_not_export
@@ -415,7 +418,7 @@
                  stock_picking.backorder_id
         ORDER BY sale_order.id ASC,
                  COALESCE(stock_picking.backorder_id, NULL, 0) ASC"""
-        params = {'shop_id': shop.id}
+        params = {'shop_id': shop.id, 'referential_id': shop.referential_id.id}
         return query, params
 
     def export_shipping(self, cr, uid, ids, context):


Follow ups