← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 670856] Re: Delivery carrier mapping correction

 

Hello,

I come back on this point because I tested some concrete cases by creating orders in Magento, importing them in OpenERP, and updating shipments in Magento. The goal of the test was to have the carrier information all the long of the flow.
I noticed a problem that I missed last time with the mapping as you have implemented.

The field magento_carrier_code in the model delivery.carrier represents the code of the carrier.
On your mapping, you get the delivery.carrier where the carrier code equals the shipping_method given by the sales_order.info Magento method, but that isn't correct : 
in Magento, a carrier code contain many Shipping Methods.
Eg. :
The carrier code laposteChronopost has these shipping methods :
 - laposteChronopost_Chronopost
 - laposteChronopost_Chrono13
 - laposteChronopost_Chrono10
 - laposteChronopost_Chrono18
 - laposteChronopost_ChronoRelais
 - laposteChronopost_RetraitBureau
 - laposteChronopost_ChronoExpressInternational
 - laposteChronopost_ChronoPremiumInternational
 - laposteChronopost_ChronoClassicInternational
 
Happily, the solution is simple because the shipping method contains the carrier code in it's nomenclature (carriercode_shippingmethod).
So I added a split on the shipping method in your mapping and that works.

Here is a patch with the modification.

Thanks,
Guewen

** Patch added: "Mapping modification"
   https://bugs.launchpad.net/magentoerpconnect/+bug/670856/+attachment/1726717/+files/mappinglines.patch

** Changed in: magentoerpconnect
       Status: Fix Released => Confirmed

-- 
Delivery carrier mapping correction
https://bugs.launchpad.net/bugs/670856
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.

Status in Magento Open ERP Connector: Confirmed

Bug description:
Hello,

I just tested the delivery carrier mapping from Magento to OpenERP with the revision http://bazaar.launchpad.net/~openlabs-akretion-consortium/magentoerpconnect/magentoerpconnect/revision/346

The condition to map the carrier is inverted, it will never be updated in OpenERP ;-)

Here is a patch with the correction.

Thanks
Guewen





References