odoo/addons/crm/test/process/mass_leads2opportunity.yml

26 lines
1.2 KiB
YAML

-
Convert two Leads to two opportunity(Mass conversion).
-
!python {model: crm.lead}: |
self.convert_opportunity(cr, uid, [ref("crm_case_employee0"), ref("crm_case_electonicgoodsdealer0")], mass_convert=True)
-
First lead converted on opportunity, I test it.
-
!python {model: crm.lead}: |
lead = self.browse(cr, uid, ref('crm_case_employee0'))
assert lead.type == 'opportunity', 'Lead is not converted to opportunity!'
assert lead.planned_revenue == 0.0, 'Planned revenue should be 0!'
assert lead.probability == 0.0, 'probability revenue should be 0!'
assert lead.partner_id.name == "Agrolait", 'Partner missmatch!'
assert lead.stage_id.id == ref("stage_lead1"), 'Stage of probability is incorrect!'
-
Second lead converted on opportunity, I test it.
-
!python {model: crm.lead}: |
lead = self.browse(cr, uid, ref('crm_case_electonicgoodsdealer0'))
assert lead.type == 'opportunity', 'Lead is not converted to opportunity!'
assert lead.planned_revenue == 0.0, 'Planned revenue should be 0!'
assert lead.probability == 0.0, 'probability revenue should be 0!'
assert lead.partner_id.name == "Le Club SARL", 'Partner missmatch!'
assert lead.stage_id.id == ref("stage_lead1"), 'Stage of probability is incorrect!'