diff options
| author | ron@tinyerp.com <> | 2011-10-13 11:22:09 +0530 |
|---|---|---|
| committer | ron@tinyerp.com <> | 2011-10-13 11:22:09 +0530 |
| commit | 5cdcd1bf45ac8dee47c8fcba4adc44934456ace7 (patch) | |
| tree | 70e595845f9bf535a57a8adcbcfe07f4f3a2dfaf | |
| parent | 0d3652a60b657ad055634276c3de2519414d61e3 (diff) | |
[IMP]: crm: All changes done on phonecall2opportunity.yml
1) string improved because put more assert,
2) Removed code search by name Its done by id all
bzr revid: ron@tinyerp.com-20111013055209-3e6741omkojcs9vm
| -rw-r--r-- | addons/crm/test/process/phonecall2opportunity.yml | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/addons/crm/test/process/phonecall2opportunity.yml b/addons/crm/test/process/phonecall2opportunity.yml index 7f81a7d86fc..89b11a80f50 100644 --- a/addons/crm/test/process/phonecall2opportunity.yml +++ b/addons/crm/test/process/phonecall2opportunity.yml @@ -15,13 +15,11 @@ self.action_apply(cr, uid, [ref("crm_phonecall2opportunity_disc_openerp")], {"active_id": ref("crm_case_phone04")}) - | For business And I check that the phonecall and the newly created business - opportunity is linked to same partner and also check with phonecall close or not. + opportunity is linked to same partner and also check with phonecall closed and opportunity + is on intial stage or not. - !python {model: crm.phonecall}: | - obj_phonecall = self.browse(cr, uid, ref('crm_case_phone04')) - ids = self.pool.get('crm.lead').search(cr, uid, [('name', '=', obj_phonecall.opportunity_id.name)]) - obj_opp = self.pool.get('crm.lead').browse(cr, uid, ids)[0] - assert obj_phonecall.partner_id == obj_opp.partner_id, "created business opportunity is not linked to same partner" - assert obj_opp.stage_id.name == "New", "Converted opportunity is not in New stage" - assert obj_opp.stage_id.probability == 10.0, "Probability of opportunity is 10.0" - assert obj_phonecall.state == "done", "phonecall is held" + phonecall = self.browse(cr, uid, ref('crm_case_phone04')) + assert phonecall.partner_id.id == phonecall.opportunity_id.partner_id.id, "created business opportunity is not linked to same partner" + assert phonecall.opportunity_id.stage_id.id == ref("stage_lead1"), "Converted opportunity is not in Initial stage" + assert phonecall.state == "done", "phonecall is held" |
