2 In order to check for changes on partner, data will be change automatically according to partner,
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"
9 I try to Unlink the Lead I create new record of lead.
11 !record {model: crm.lead, id: crm_case_new_lead}:
12 name: Openerp Trainning
15 In order to test unlink lead, i will do unlink this lead
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'
22 self.unlink(cr, uid, [ref("crm_case_new_lead")])