Merge lp:~openerp-chinese-team/e-commerce-addons/guest-order-bug-fix into lp:~extra-addons-commiter/e-commerce-addons/oerp6.1-stable

Proposed by Joshua Jan(SHINEIT)
Status: Merged
Merged at revision: 278
Proposed branch: lp:~openerp-chinese-team/e-commerce-addons/guest-order-bug-fix
Merge into: lp:~extra-addons-commiter/e-commerce-addons/oerp6.1-stable
Diff against target: 29 lines (+3/-2)
1 file modified
base_sale_multichannels/sale.py (+3/-2)
To merge this branch: bzr merge lp:~openerp-chinese-team/e-commerce-addons/guest-order-bug-fix
Reviewer Review Type Date Requested Status
Guewen Baconnier @ Camptocamp Approve
Review via email: mp+131812@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/magentoerpconnect/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 :

Hi,

Thanks for your fix.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'base_sale_multichannels/sale.py'
2--- base_sale_multichannels/sale.py 2012-08-21 07:38:58 +0000
3+++ base_sale_multichannels/sale.py 2012-10-29 03:11:21 +0000
4@@ -535,7 +535,7 @@
5 return super(sale_order, self)._import_resources(cr, uid, external_session, defaults=defaults, method=method, context=context)
6
7
8- def check_if_order_exist(self, cr, uid, external_session, resource, order_mapping=None, context=None):
9+ def check_if_order_exist(self, cr, uid, external_session, resource, order_mapping=None, defaults=None, context=None):
10 mapping_name = False
11 for line in order_mapping['mapping_lines']:
12 if line['internal_field'] == 'name':
13@@ -546,6 +546,7 @@
14 'from_external_to_openerp', resource,
15 mapping=local_mapping,
16 mapping_id=1,
17+ defaults=defaults,
18 context=context)
19 if vals.get('name'):
20 exist_id = self.search(cr, uid, [['name', '=', vals['name']]], context=context)
21@@ -562,7 +563,7 @@
22 mapping, mapping_id = self._init_mapping(cr, uid, external_session.referential_id.id,
23 mapping=mapping, mapping_id=mapping_id, context=context)
24 exist_id = self.check_if_order_exist(cr, uid, external_session, resource,
25- order_mapping=mapping[mapping_id], context=context)
26+ order_mapping=mapping[mapping_id], defaults=defaults, context=context)
27 if exist_id:
28 return {}
29 else:

Subscribers

People subscribed via source and target branches