~camptocamp/e-commerce-addons/7.0-sale_payment_method-base_transaction_id

« back to all changes in this revision

Viewing changes to base_sale_multichannels/sale.py

  • Committer: Guewen Baconnier
  • Author(s): Alexandre Fayolle
  • Date: 2013-01-03 10:04:56 UTC
  • mfrom: (272.1.2 oerp6.1-stable-fix-1080690)
  • Revision ID: guewen.baconnier@camptocamp.com-20130103100456-06q7ujhyz4onmjfs
[FIX] base_sale_multichannel export shipping query : do not consider canceled moves, export shippings on all shops, instead of stopping at the first without anything to export

Show diffs side-by-side

added added

removed removed

Lines of Context:
393
393
        LEFT JOIN sale_order
394
394
                  ON sale_order.id = stock_picking.sale_id
395
395
        LEFT JOIN stock_picking as pickings
396
 
                  ON (sale_order.id = pickings.sale_id AND pickings.type='out')
 
396
                  ON (sale_order.id = pickings.sale_id
 
397
                      AND pickings.type='out'
 
398
                      AND pickings.state!='cancel')
397
399
        LEFT JOIN ir_model_data
398
400
                  ON stock_picking.id = ir_model_data.res_id
399
401
                  AND ir_model_data.model = 'stock.picking'
424
426
            results = cr.dictfetchall()
425
427
            if not results:
426
428
                _logger.info("There is no shipping to export for the shop '%s' to the external referential", shop.name)
427
 
                return True
 
429
                continue
428
430
            context['conn_obj'] = shop.referential_id.external_connection()
429
431
 
430
432