Merge lp:~angelmoya/prestashoperpconnect/prestashoperpconnect into lp:prestashoperpconnect/6.1

Proposed by Angel Moya - Domatix on 2012-07-06
Status: Rejected
Rejected by: Sébastien BEAU - http://www.akretion.com on 2014-10-07
Proposed branch: lp:~angelmoya/prestashoperpconnect/prestashoperpconnect
Merge into: lp:prestashoperpconnect/6.1
Diff against target: 58 lines (+18/-26)
2 files modified
prestashoperpconnect/settings/1.4.0.0/res.partner.address/external.mappinglines.template.csv (+12/-17)
prestashoperpconnect/settings/1.4.0.0/res.partner/external.mappinglines.template.csv (+6/-9)
To merge this branch: bzr merge lp:~angelmoya/prestashoperpconnect/prestashoperpconnect
Reviewer Review Type Date Requested Status
Sébastien BEAU - http://www.akretion.com 2012-07-06 Disapprove on 2014-10-07
Review via email: mp+113718@code.launchpad.net

Description of the change

Fix mapping to import res.partner and res.partner.address in 1.4

To post a comment you must log in.

Hello Angel, did your merge is still up to date?
If yes I will merge but without testing on a prestashop 1.4.
I start to work again on the connector but I will focus my effort on 1.5, so not time to test on 1.4.

Thanks for your help

Regards

The project has moved to Github https://github.com/OCA/connector-prestashop.
Please resubmit your MP on github using following procedure https://github.com/OCA/maintainers-tools/wiki/How-to-move-a-Merge-Proposal-to-GitHub.

I put this MP in rejected in the meanwhile.

Regards

Unmerged revisions

53. By Angel Moya <angel@mint> on 2012-07-06

FIX res.partner.address mapping firstname in 1.4

52. By Angel Moya <angel@mint> on 2012-07-06

FIX res.partner mapping active in 1.4

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'prestashoperpconnect/settings/1.4.0.0/res.partner.address/external.mappinglines.template.csv'
2--- prestashoperpconnect/settings/1.4.0.0/res.partner.address/external.mappinglines.template.csv 2012-04-15 13:28:59 +0000
3+++ prestashoperpconnect/settings/1.4.0.0/res.partner.address/external.mappinglines.template.csv 2012-07-06 10:09:22 +0000
4@@ -1,20 +1,15 @@
5-"id","mapping_id:id","external_field","field_id:id","type","evaluation_type","external_type","child_mapping_id:id","alternative_key","in_function","out_function"
6-"prestashoperpconnect.prestashop1400_res_partner_address_id_customer","prestashoperpconnect.prestashop_1400_partner_address","id_customer","base.field_res_partner_address_partner_id","in_out","direct","int",,"False","if ifield:
7+id,mapping_id:id,external_field,field_id:id,type,evaluation_type,external_type,child_mapping_id:id,alternative_key,in_function,out_function
8+prestashoperpconnect.prestashop1400_res_partner_address_id_customer,prestashoperpconnect.prestashop_1400_partner_address,id_customer,base.field_res_partner_address_partner_id,in_out,direct,int,,False,"if ifield:
9 result = [('name', ifield + ' ' + data['lastname'] or '')]
10 else:
11 result = [('name', data['lastname'] or '')]","add_id = self.browse(cr, uid, record['id'])"
12-"prestashoperpconnect.prestashop1400_res_partner_address_email","prestashoperpconnect.prestashop_1400_partner_address","email","base.field_res_partner_address_email","in_out","direct","unicode",,"False",,
13-"prestashoperpconnect.prestashop1400_res_partner_address_contact_name","prestashoperpconnect.prestashop_1400_partner_address","contact_name","base.field_res_partner_address_name","in_out","direct","unicode",,"False",,
14-"prestashoperpconnect.prestashop1400_res_partner_address_contact_type","prestashoperpconnect.prestashop_1400_partner_address","contact_type","base.field_res_partner_address_type","in_out","direct","unicode",,"False",,
15-"prestashoperpconnect.prestashop1400_res_partner_address_firstname","prestashoperpconnect.prestashop_1400_partner_address","firstname","base.field_res_partner_address_name","in_out","function","unicode",,"False","if not data['contact_name']:
16- if ifield:
17- result = [('name', ifield + ' ' + data['lastname'] or '')]
18- else:
19- result = [('name', data['lastname'] or '')]
20-else:
21- result = [('name', data['contact_name'] or '')]","add_id = self.browse(cr, uid, record['id'])"
22-"prestashoperpconnect.prestashop1400_res_partner_address_city","prestashoperpconnect.prestashop_1400_partner_address","city","base.field_res_partner_address_city","in_out","direct","unicode",,"False",,
23-"prestashoperpconnect.prestashop1400_res_partner_address_address1","prestashoperpconnect.prestashop_1400_partner_address","address1","base.field_res_partner_address_street","in_out","direct","unicode",,"False",,
24-"prestashoperpconnect.prestashop1400_res_partner_address_address2","prestashoperpconnect.prestashop_1400_partner_address","address2","base.field_res_partner_address_street2","in_out","direct","unicode",,"False",,
25-"prestashoperpconnect.prestashop1400_res_partner_address_phone_mobile","prestashoperpconnect.prestashop_1400_partner_address","phone_mobile","base.field_res_partner_address_mobile","in_out","direct","unicode",,"False",,
26-"prestashoperpconnect.prestashop1400_res_partner_address_erp_postcode","prestashoperpconnect.prestashop_1400_partner_address","postcode","base.field_res_partner_address_zip","in_out","direct","unicode",,"False",,
27+prestashoperpconnect.prestashop1400_res_partner_address_email,prestashoperpconnect.prestashop_1400_partner_address,email,base.field_res_partner_address_email,in_out,direct,unicode,,False,,
28+prestashoperpconnect.prestashop1400_res_partner_address_contact_name,prestashoperpconnect.prestashop_1400_partner_address,contact_name,base.field_res_partner_address_name,in_out,direct,unicode,,False,,
29+prestashoperpconnect.prestashop1400_res_partner_address_contact_type,prestashoperpconnect.prestashop_1400_partner_address,contact_type,base.field_res_partner_address_type,in_out,direct,unicode,,False,,
30+prestashoperpconnect.prestashop1400_res_partner_address_firstname,prestashoperpconnect.prestashop_1400_partner_address,firstname,base.field_res_partner_address_name,in_out,function,unicode,,False,"if (not 'contact_name' in data) or (not data['contact_name']):
31+ result = [('name', (ifield or '') + (data['lastname'] or ''))]","add_id = self.browse(cr, uid, record['id'])"
32+prestashoperpconnect.prestashop1400_res_partner_address_city,prestashoperpconnect.prestashop_1400_partner_address,city,base.field_res_partner_address_city,in_out,direct,unicode,,False,,"result = [('name', (ifield or '') + (data['lastname'] or ''))]"
33+prestashoperpconnect.prestashop1400_res_partner_address_address1,prestashoperpconnect.prestashop_1400_partner_address,address1,base.field_res_partner_address_street,in_out,direct,unicode,,False,,
34+prestashoperpconnect.prestashop1400_res_partner_address_address2,prestashoperpconnect.prestashop_1400_partner_address,address2,base.field_res_partner_address_street2,in_out,direct,unicode,,False,,
35+prestashoperpconnect.prestashop1400_res_partner_address_phone_mobile,prestashoperpconnect.prestashop_1400_partner_address,phone_mobile,base.field_res_partner_address_mobile,in_out,direct,unicode,,False,,
36+prestashoperpconnect.prestashop1400_res_partner_address_erp_postcode,prestashoperpconnect.prestashop_1400_partner_address,postcode,base.field_res_partner_address_zip,in_out,direct,unicode,,False,,
37
38=== modified file 'prestashoperpconnect/settings/1.4.0.0/res.partner/external.mappinglines.template.csv'
39--- prestashoperpconnect/settings/1.4.0.0/res.partner/external.mappinglines.template.csv 2012-04-15 13:28:59 +0000
40+++ prestashoperpconnect/settings/1.4.0.0/res.partner/external.mappinglines.template.csv 2012-07-06 10:09:22 +0000
41@@ -1,11 +1,8 @@
42-"id","mapping_id:id","external_field","field_id:id","type","evaluation_type","external_type","child_mapping_id:id","alternative_key","in_function","out_function"
43-"prestashoperpconnect.prestashop1400_res_partner_active_deleted","prestashoperpconnect.prestashop_1400_partner","deleted","base.field_res_partner_active","in_out","function","float",,"False","if ifield == 1 :
44- result = [('active', False)]
45-else:
46- result = [('active', True)]",
47-"prestashoperpconnect.prestashop1400_res_partner_main_contact","prestashoperpconnect.prestashop_1400_partner","main_contact","base.field_res_partner_address","in_out","sub-mapping","list","prestashoperpconnect.prestashop_1400_partner_address","False","result = [('name', ifield or '' + ' ' + data['name'] or '')]","add_id = self.browse(cr, uid, record['id'])"
48-"prestashoperpconnect.prestashop1400_res_partner_website_website","prestashoperpconnect.prestashop_1400_partner","website","base.field_res_partner_website","in_out","direct","unicode",,"False",,
49-"prestashoperpconnect.prestashop1400_res_partner_name_name","prestashoperpconnect.prestashop_1400_partner","lastname","base.field_res_partner_name","in_out","function","unicode",,"False","name = data.get('firstname', False) or ''
50+id,mapping_id:id,external_field,field_id:id,type,evaluation_type,external_type,child_mapping_id:id,alternative_key,in_function,out_function
51+prestashoperpconnect.prestashop1400_res_partner_active_deleted,prestashoperpconnect.prestashop_1400_partner,deleted,base.field_res_partner_active,in_out,function,unicode,,False,"result = [('active', ifield=='1')]",
52+prestashoperpconnect.prestashop1400_res_partner_main_contact,prestashoperpconnect.prestashop_1400_partner,main_contact,base.field_res_partner_address,in_out,sub-mapping,list,prestashoperpconnect.prestashop_1400_partner_address,False,"result = [('name', ifield or '' + ' ' + data['name'] or '')]","add_id = self.browse(cr, uid, record['id'])"
53+prestashoperpconnect.prestashop1400_res_partner_website_website,prestashoperpconnect.prestashop_1400_partner,website,base.field_res_partner_website,in_out,direct,unicode,,False,,
54+prestashoperpconnect.prestashop1400_res_partner_name_name,prestashoperpconnect.prestashop_1400_partner,lastname,base.field_res_partner_name,in_out,function,unicode,,False,"name = data.get('firstname', False) or ''
55 name += (data.get('lastname', False) and ' ' + data.get('lastname', False)) or ''
56 result = [('name', name)]","add_id = self.browse(cr, uid, record['id'])"
57-"prestashoperpconnect.prestashop1400_res_partner_email_email","prestashoperpconnect.prestashop_1400_partner","email","base.field_res_partner_email","in_out","direct","unicode",,"False",,
58+prestashoperpconnect.prestashop1400_res_partner_email_email,prestashoperpconnect.prestashop_1400_partner,email,base.field_res_partner_email,in_out,direct,unicode,,False,,