Merge lp:~openerp-chinese-team/magentoerpconnect/guest-order-bug-fix into lp:magentoerpconnect/oerp6.1-stable

Proposed by Joshua Jan(SHINEIT)
Status: Rejected
Rejected by: Sébastien BEAU - http://www.akretion.com
Proposed branch: lp:~openerp-chinese-team/magentoerpconnect/guest-order-bug-fix
Merge into: lp:magentoerpconnect/oerp6.1-stable
Diff against target: 35 lines (+8/-6)
1 file modified
magentoerpconnect/sale.py (+8/-6)
To merge this branch: bzr merge lp:~openerp-chinese-team/magentoerpconnect/guest-order-bug-fix
Reviewer Review Type Date Requested Status
Sébastien BEAU - http://www.akretion.com Disapprove
Guewen Baconnier @ Camptocamp Needs Resubmitting
Review via email: mp+131813@code.launchpad.net

Description of the change

Hello all,
    There are two change to fix the https://bugs.launchpad.net/magentoerpconnect/+bug/1054059
    Another one:
    https://code.launchpad.net/~openerp-chinese-team/e-commerce-addons/guest-order-bug-fix
Best Regards
Joshua

To post a comment you must log in.
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

Hello,

Your merge proposal is conflicting against the current code. Can you rebase your branch and propose your merge again please?
By the way, you'll want to check because it seems to have been fixed in a different manner on the main branch.

Thanks for your proposal

review: Needs Resubmitting
Revision history for this message
Sébastien BEAU - http://www.akretion.com (sebastien.beau) wrote :

I confirm the bug related have been closed. So no need to merge this branch
http://bazaar.launchpad.net/~magentoerpconnect-core-editors/magentoerpconnect/oerp6.1-stable/revision/676.2.36

Thanks

review: Disapprove

Unmerged revisions

678. By Joshua Jan(SHINEIT)

fix [base_sale_multichannels] Importing Guest-Orders is not possible

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'magentoerpconnect/sale.py'
2--- magentoerpconnect/sale.py 2012-08-20 09:39:45 +0000
3+++ magentoerpconnect/sale.py 2012-10-29 03:13:18 +0000
4@@ -401,15 +401,17 @@
5 mapping_line_filter_ids=None, parent_data=None, previous_result=None, defaults=None, context=None):
6 resource = self.clean_magento_resource(cr, uid, resource, context=context)
7 resource = self.clean_magento_items(cr, uid, resource, context=context)
8- if not resource['customer_id']:
9+ if not resource.get('customer_id', False):
10 #If there is not partner it's a guest order
11 #So we remove the useless information
12 #And create a partner on fly and set the data in the default value
13- del resource['customer_id']
14- del resource['billing_address']['customer_id']
15- del resource['shipping_address']['customer_id']
16+ if 'customer_id' in resource:
17+ del resource['customer_id']
18+ if 'customer_id' in resource['billing_address']:
19+ del resource['billing_address']['customer_id']
20+ if 'customer_id' in resource['shipping_address']:
21+ del resource['shipping_address']['customer_id']
22 defaults = self.create_onfly_partner(cr, uid, external_session, resource, mapping, defaults, context=context)
23-
24 return super(sale_order, self)._transform_one_resource(cr, uid, external_session, convertion_type, resource,\
25 mapping, mapping_id, mapping_line_filter_ids=mapping_line_filter_ids, parent_data=parent_data,\
26 previous_result=previous_result, defaults=defaults, context=context)
27@@ -624,7 +626,7 @@
28 # in the sale order and sometime it's equal to NONE in the address but at least the
29 # the information is correct in one of this field
30 # So I make this ugly code to try to fix it.
31- if not resource['customer_id']:
32+ if not resource.get('customer_id', False):
33 if resource['billing_address'].get('customer_id'):
34 resource['customer_id'] = resource['billing_address']['customer_id']
35 else: