[REF, IMP]: crm: All changes done on lead_form.yml

1) Added lead on form for copy and delete function
2) Checked code according to delete lead

bzr revid: ron@tinyerp.com-20111013091123-refu3d0l1b7g7swl
This commit is contained in:
ron@tinyerp.com 2011-10-13 14:41:23 +05:30
parent 57cc6f533c
commit 5fb61d943f
1 changed files with 8 additions and 7 deletions

View File

@ -2,19 +2,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)
action = self.onchange_partner_address_id(cr, uid, ref("crm_case_qrecorp0"), 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
!record {model: crm.lead, id: crm_case_new_lead}:
name: Opnerp Trainning
state: cancel
-
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')
try:
self.unlink(cr, uid, [ref("crm_case_new_lead")])
except:
pass