Merge lp:~openerp-connector-community/openerp-connector-magento/7.0-magentoerpconnect-carrier-export-1238951 into lp:~openerp-connector-core-editors/openerp-connector-magento/7.0

Proposed by Guewen Baconnier @ Camptocamp
Status: Merged
Merged at revision: 929
Proposed branch: lp:~openerp-connector-community/openerp-connector-magento/7.0-magentoerpconnect-carrier-export-1238951
Merge into: lp:~openerp-connector-core-editors/openerp-connector-magento/7.0
Diff against target: 24 lines (+7/-1)
1 file modified
magentoerpconnect/stock_tracking.py (+7/-1)
To merge this branch: bzr merge lp:~openerp-connector-community/openerp-connector-magento/7.0-magentoerpconnect-carrier-export-1238951
Reviewer Review Type Date Requested Status
Allison (community) Approve
Brendan Clune (Logic Supply) (community) Approve
OpenERP Connector Core Editors Pending
Review via email: mp+190813@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Brendan Clune (Logic Supply) (brendan-clune) wrote :

LGTM, haven't tested but Allison Miller will test today and provide a review.

review: Approve
Revision history for this message
Allison (allison-miller) wrote :

Works great, thanks for the quick work

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'magentoerpconnect/stock_tracking.py'
--- magentoerpconnect/stock_tracking.py 2013-05-01 12:33:18 +0000
+++ magentoerpconnect/stock_tracking.py 2013-10-12 19:55:10 +0000
@@ -80,13 +80,19 @@
80 if not picking.carrier_tracking_ref:80 if not picking.carrier_tracking_ref:
81 return _('No tracking number to send.')81 return _('No tracking number to send.')
8282
83 sale_binding_id = picking.magento_order_id
84 if not sale_binding_id:
85 return FailedJobError("No sales order is linked with the picking "
86 "%s, can't export the tracking number." %
87 picking.name)
88
83 magento_picking_id = picking.magento_id89 magento_picking_id = picking.magento_id
84 if magento_picking_id is None:90 if magento_picking_id is None:
85 raise NoExternalId("No value found for the picking ID on "91 raise NoExternalId("No value found for the picking ID on "
86 "Magento side, the job will be retried later.")92 "Magento side, the job will be retried later.")
8793
88 self._validate(picking)94 self._validate(picking)
89 self._check_allowed_carrier(picking, magento_picking_id)95 self._check_allowed_carrier(picking, sale_binding_id.magento_id)
90 tracking_args = self._get_tracking_args(picking)96 tracking_args = self._get_tracking_args(picking)
91 self.backend_adapter.add_tracking_number(magento_picking_id,97 self.backend_adapter.add_tracking_number(magento_picking_id,
92 *tracking_args)98 *tracking_args)