24 lines
1.2 KiB
YAML
24 lines
1.2 KiB
YAML
-
|
|
For customer purpose, I called to him/her for discussion about openerp.
|
|
As the success of phonecall seems to be a real business opportunity, so first i
|
|
create record of phonecall.
|
|
-
|
|
!record {model: crm.phonecall2opportunity, id: crm_phonecall2opportunity_disc_openerp}:
|
|
name: Discuss Review Process
|
|
partner_id: base.res_partner_tinyatwork
|
|
-
|
|
Succeed phonecall, it's convert into on opportunity.
|
|
-
|
|
!python {model: crm.phonecall2opportunity}: |
|
|
self.action_apply(cr, uid, [ref("crm_phonecall2opportunity_disc_openerp")], {"active_id": ref("crm_case_phone04")})
|
|
-
|
|
I check that the phonecall and the newly created business opportunity is
|
|
linked to same partner and also check with phonecall closed and opportunity
|
|
is on intial stage or not.
|
|
-
|
|
!python {model: crm.phonecall}: |
|
|
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"
|