From dc95f95342cf360e74ae9332cc5b0b52dd045a83 Mon Sep 17 00:00:00 2001 From: "ron@tinyerp.com" <> Date: Mon, 17 Oct 2011 16:55:25 +0530 Subject: [PATCH] [ADD] crm: 1) Added schedule_other_phonecall.yml, 2) checked schedule call created bzr revid: ron@tinyerp.com-20111017112525-8fhqb8iuclh9hdkp --- addons/crm/__openerp__.py | 1 + .../test/process/schedule_other_phonecall.yml | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 addons/crm/test/process/schedule_other_phonecall.yml diff --git a/addons/crm/__openerp__.py b/addons/crm/__openerp__.py index 49fc12f9747..cbcaa774c05 100644 --- a/addons/crm/__openerp__.py +++ b/addons/crm/__openerp__.py @@ -128,6 +128,7 @@ Creates a dashboard for CRM that includes: 'test/ui/lead_form.yml', 'test/process/phonecall2opportunity.yml', 'test/process/phonecall2meeting.yml', + 'test/process/schedule_other_phonecall.yml' ], 'installable': True, 'active': False, diff --git a/addons/crm/test/process/schedule_other_phonecall.yml b/addons/crm/test/process/schedule_other_phonecall.yml new file mode 100644 index 00000000000..a92496dc265 --- /dev/null +++ b/addons/crm/test/process/schedule_other_phonecall.yml @@ -0,0 +1,23 @@ +- + I schedule phonecall to another phonecall, so first i create record of schedule call. +- + !record {model: crm.phonecall2phonecall, id: crm_schedule_phonecall}: + name: 'Test Discuss Review Process' + categ_id: crm.categ_phone1 + date: !eval time.strftime('%Y-%m-%d') +- + I Convert schedule phonecall. +- + !python {model: crm.phonecall2phonecall}: | + self.action_apply(cr, uid, [ref('crm_schedule_phonecall')], {'active_id': ref('crm_case_phone04')}) +- + I check for another schedule call. +- + !python {model: crm.phonecall}: | + phonecall = self.search(cr, uid, [('name', '=', 'Test Discuss Review Process')]) + assert phonecall, "Do not create another schedule call" + schedule_phonecall = self.browse(cr, uid, phonecall)[0] + assert schedule_phonecall.user_id.id == ref("base.user_root"), "Responsible person not assign" + assert schedule_phonecall.section_id.id == ref("crm.section_sales_department"), "Do not assign proper section" + assert schedule_phonecall.categ_id.id == ref("crm.categ_phone1"), "Category of phonecall is not apply" + assert schedule_phonecall.partner_id.id == ref("base.res_partner_tinyatwork"), "Partner missmatch" \ No newline at end of file