[IMP] crm: removed one string on cancel_lead.yml
[odoo/odoo.git] / addons / crm / test / ui / lead_form.yml
1 -
2   In order to check for changes on partner, data will be change automatically according to partner,
3 -
4   !python {model: crm.lead}: |
5     action = self.onchange_partner_address_id(cr, uid, ref("crm_case_qrecorp0"), ref("base.res_partner_address_notsotinysarl0"), email=False)
6     assert action['value']['country_id'] == 20, "Country name not True"
7     assert action['value']['phone'] == '(+32).81.81.37.00', "phone number is wrong"
8 -
9   I try to Unlink the Lead I create new record of lead. 
10 -
11   !record {model: crm.lead, id: crm_case_new_lead}:
12     name: Openerp Trainning
13     state: cancel
14 -
15   In order to test unlink lead, i will do unlink this lead
16 -
17   !python {model: crm.lead}: |
18     self.copy(cr, uid, ref("crm_case_new_lead"))
19     sid = self.search(cr, uid, [('name', '=', 'Openerp Trainning')])
20     assert len(sid) == 2, 'Lead is not copied Successfully'
21     try:
22       self.unlink(cr, uid, [ref("crm_case_new_lead")])
23     except:
24       pass