From dc3af97631f3f5b13f829d9d924a7ca2c7f1c06a Mon Sep 17 00:00:00 2001 From: "dle@openerp.com" <> Date: Wed, 6 Feb 2013 14:18:48 +0100 Subject: [PATCH 1/3] [FIX]crm lead: merge lead/opps concatened description test bzr revid: dle@openerp.com-20130206131848-u1r7lc9r89a2zc3r --- addons/crm/test/process/merge_opportunity.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/crm/test/process/merge_opportunity.yml b/addons/crm/test/process/merge_opportunity.yml index 2f0b8e82956..d0aecb04db8 100644 --- a/addons/crm/test/process/merge_opportunity.yml +++ b/addons/crm/test/process/merge_opportunity.yml @@ -41,7 +41,7 @@ assert merge_id, 'Fail to create merge opportunity wizard' merge_result = self.browse(cr, uid, merge_id)[0] assert merge_result.partner_id.id == ref("base.res_partner_1"), 'Partner mismatch: when merging leads/opps with different m2o values, the first not null value prevails (the other are dropped)' - assert merge_result.description == 'This is the description of the test lead 1., This is the description of the test lead 2., This is the description of the test opp 1.', 'Description mismatch: when merging leads/opps with different text values, these values should get concatenated and separeted with ", "' + assert merge_result.description == 'This is the description of the test lead 1.\n\n This is the description of the test lead 2.\n\n This is the description of the test opp 1.', 'Description mismatch: when merging leads/opps with different text values, these values should get concatenated and separeted with ", "' assert merge_result.type == 'opportunity', 'Type mismatch: when at least one opp in involved in the merge, the result should be a new opp (instead of %s)' % merge_result.type - The other (tailing) leads/opps shouldn't exist anymore. From c84d60a74e5dad3ee6d11ec9622e71af23f230d6 Mon Sep 17 00:00:00 2001 From: "dle@openerp.com" <> Date: Wed, 6 Feb 2013 14:22:19 +0100 Subject: [PATCH 2/3] [FIX]Forget to re-revert ,.join bzr revid: dle@openerp.com-20130206132219-o1y154vo40r0rsyx --- addons/crm/crm_lead.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index 5755174b7b7..d5f90d8a653 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -498,7 +498,7 @@ class crm_lead(base_stage, format_address, osv.osv): return res and res.id or False def _concat_all(attr): - return ','.join(filter(lambda x: x, [getattr(opp, attr) or '' for opp in opportunities if hasattr(opp, attr)])) + return '\n\n'.join(filter(lambda x: x, [getattr(opp, attr) or '' for opp in opportunities if hasattr(opp, attr)])) # Process the fields' values data = {} From beb4032c0dc16694f0bea86bdf3c1f1b82916433 Mon Sep 17 00:00:00 2001 From: "dle@openerp.com" <> Date: Wed, 6 Feb 2013 14:46:14 +0100 Subject: [PATCH 3/3] [FIX]Remove space in crm lead merge tests. bzr revid: dle@openerp.com-20130206134614-uzeb1vacqezh8n1a --- addons/crm/test/process/merge_opportunity.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/crm/test/process/merge_opportunity.yml b/addons/crm/test/process/merge_opportunity.yml index d0aecb04db8..c50af5214e6 100644 --- a/addons/crm/test/process/merge_opportunity.yml +++ b/addons/crm/test/process/merge_opportunity.yml @@ -41,7 +41,7 @@ assert merge_id, 'Fail to create merge opportunity wizard' merge_result = self.browse(cr, uid, merge_id)[0] assert merge_result.partner_id.id == ref("base.res_partner_1"), 'Partner mismatch: when merging leads/opps with different m2o values, the first not null value prevails (the other are dropped)' - assert merge_result.description == 'This is the description of the test lead 1.\n\n This is the description of the test lead 2.\n\n This is the description of the test opp 1.', 'Description mismatch: when merging leads/opps with different text values, these values should get concatenated and separeted with ", "' + assert merge_result.description == 'This is the description of the test lead 1.\n\nThis is the description of the test lead 2.\n\nThis is the description of the test opp 1.', 'Description mismatch: when merging leads/opps with different text values, these values should get concatenated and separated with line returns' assert merge_result.type == 'opportunity', 'Type mismatch: when at least one opp in involved in the merge, the result should be a new opp (instead of %s)' % merge_result.type - The other (tailing) leads/opps shouldn't exist anymore.