Searching for allowed carriers incorrectly uses magento_picking_id instead of magento_order_id

Bug #1238951 reported by Brendan Clune (Logic Supply) on 2013-10-11
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenERP Connector - Magento
High
Guewen Baconnier @ Camptocamp

Bug Description

Lines 83-92 in stock_tracking.py:

magento_picking_id = picking.magento_id
if magento_picking_id is None:
    raise NoExternalId("No value found for the picking ID on "
                       "Magento side, the job will be retried later.")

self._validate(picking)
self._check_allowed_carrier(picking, magento_picking_id)
tracking_args = self._get_tracking_args(picking)
self.backend_adapter.add_tracking_number(magento_picking_id,
                                         *tracking_args)

The call to _check_allowed_carrier hits the getCarriers API endpoint in Magento, which expects the increment id of the magento sale, rather than the delivery object. The add_tracking_number call seems correct in this case.

Related branches

lp:~openerp-connector-community/openerp-connector-magento/7.0-magentoerpconnect-carrier-export-1238951
Allison (community): Approve on 2013-10-15
Brendan Clune (Logic Supply) (community): Approve on 2013-10-14
OpenERP Connector Core Editors: Pending requested 2013-10-12

For clarification, here is the Magento API call:

 public function getCarriers($orderIncrementId)
    {
        $order = Mage::getModel('sales/order')->loadByIncrementId($orderIncrementId);
    ...

description: updated
description: updated
description: updated
Changed in openerp-connector:
status: New → Confirmed
importance: Undecided → High

Thanks for the report, you are right.
I linked a proposal.

Changed in openerp-connector:
assignee: nobody → Guewen Baconnier @ Camptocamp (gbaconnier-c2c)
information type: Embargoed → Public
affects: openerp-connector → openerp-connector-magento
Changed in openerp-connector-magento:
status: Confirmed → Fix Committed

Fix released en 2.2.1

Changed in openerp-connector-magento:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers