[ADD] crm: 1) Added lead_form.yml,

2) Covered onchange_partner operation and unlink operation

bzr revid: ron@tinyerp.com-20111012115644-q91ejya01c8k28m1
This commit is contained in:
ron@tinyerp.com 2011-10-12 17:26:44 +05:30
parent 6b19d9baa1
commit e355b8b55d
2 changed files with 21 additions and 0 deletions

View File

@ -123,6 +123,7 @@ Creates a dashboard for CRM that includes:
'test/process/crm_lead_to_opportunity.yml',
'test/process/cancle_crm_lead.yml',
'test/process/crm_meeting.yml',
'test/ui/lead_form.yml',
'test/test_crm_opportunity.yml',
'test/process/process_crm_phonecall.yml',
'test/test_crm_recurrent_meeting.yml',

View File

@ -0,0 +1,20 @@
-
In order to check for changes on partner, data will be change automatically according to partner,
-
!python {model: crm.lead}: |
action = self.onchange_partner_address_id(cr, uid, ref("crm_case_initialdiscussion0"), ref("base.res_partner_address_notsotinysarl0"), email=False)
assert action['value']['country_id'] == 20, "Country name not True"
assert action['value']['phone'] == '(+32).81.81.37.00', "phone number is wrong"
-
I try to Unlink the Lead I create new record of lead.
-
!record {model: crm.lead, id: crm_lead_intested_openerp}:
name: Interested in openerp
-
In order to test unlink lead, i will do unlink this lead
-
!python {model: crm.lead}: |
from tools.translate import _
self.unlink(cr, uid, [ref("crm_lead_intested_openerp")])
id = self.search(cr, uid, [('id', '=', ref("crm_lead_intested_openerp"))])
assert len(id) < 1, _('Lead is not deleted')