Merge lp:~hanane-s/prestashoperpconnect/prestashoperpconnect-map-country-in-addresses into lp:prestashoperpconnect

Proposed by hanane
Status: Rejected
Rejected by: Sébastien BEAU - http://www.akretion.com
Proposed branch: lp:~hanane-s/prestashoperpconnect/prestashoperpconnect-map-country-in-addresses
Merge into: lp:prestashoperpconnect
Diff against target: 19 lines (+9/-0)
1 file modified
prestashoperpconnect/unit/mapper.py (+9/-0)
To merge this branch: bzr merge lp:~hanane-s/prestashoperpconnect/prestashoperpconnect-map-country-in-addresses
Reviewer Review Type Date Requested Status
PrestashopERPConnect core editors Pending
Review via email: mp+177335@code.launchpad.net

Description of the change

we map the country in addresses when we get the new addresses from prestashop

To post a comment you must log in.
Revision history for this message
Sébastien BEAU - http://www.akretion.com (sebastien.beau) wrote :

Hi hanane, thanks for your work
I did not see you merge before and I had propose similary to your work here
https://code.launchpad.net/~sebastien.beau/prestashoperpconnect/prestashoperpconnect-fix/+merge/179949

But I think the good solution is to add a generic powerfull binding and use a direct mapping.
I will talk about it tomorrow with Guewen

Have a good day

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

Hi hanane I merge a fix, I do not use the method get_openerp_id as I think this method should be remove (using unwrap in binding is better)
The merge done is here :
https://code.launchpad.net/~sebastien.beau/prestashoperpconnect/prestashoperpconnect-fix/+merge/179949

Thanks for your work

Unmerged revisions

243. By hanane

[IMP] mapping country with customer addresses

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'prestashoperpconnect/unit/mapper.py'
--- prestashoperpconnect/unit/mapper.py 2013-07-17 07:03:37 +0000
+++ prestashoperpconnect/unit/mapper.py 2013-07-29 09:12:32 +0000
@@ -231,6 +231,15 @@
231 @mapping231 @mapping
232 def customer(self, record):232 def customer(self, record):
233 return {'customer': True}233 return {'customer': True}
234
235 @mapping
236 def country_id(self, record):
237 if record.get('id_country'):
238 return {'country_id': self.get_openerp_id(
239 'prestashop.res.country',
240 record['id_country']
241 )}
242 return {}
234243
235244
236@prestashop245@prestashop