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 on 2013-10-12
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/ (+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 on 2013-10-15
Brendan Clune (Logic Supply) (community) Approve on 2013-10-14
OpenERP Connector Core Editors 2013-10-12 Pending
Review via email:
To post a comment you must log in.

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

review: Approve
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/'
--- magentoerpconnect/ 2013-05-01 12:33:18 +0000
+++ magentoerpconnect/ 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.')
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." %
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.")
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)