12 lines
754 B
YAML
12 lines
754 B
YAML
-
|
|
Convert partner to opportunity, i test to convert opportunity is from partner.
|
|
-
|
|
!python {model: res.partner}: |
|
|
opportunity = self.make_opportunity(cr, uid, [ref("base.res_partner_9")], 'BalmerInc S.A.', 200.0, 150.0)
|
|
opportunity_rec = self.pool.get('crm.lead').browse(cr, uid, opportunity['res_id'])
|
|
assert opportunity_rec.type == 'opportunity', 'Lead is not converted to opportunity!'
|
|
assert opportunity_rec.planned_revenue == 200.0, 'Planned revenue should be 200!'
|
|
assert opportunity_rec.probability == 150.0, 'probability revenue should be 150!'
|
|
assert opportunity_rec.partner_id.id == ref("base.res_partner_9"), 'Partner missmatch!'
|
|
assert opportunity_rec.state == 'draft', 'Opportunity stage not in draft state'
|