[IMP] crm_claim: Created record on yml instead of calling onchange_event manually and renamed onchange_event.yml to claim_demo.yml
bzr revid: ron@tinyerp.com-20111123095416-2655ypsaymzqbr61
This commit is contained in:
parent
2b01f2b501
commit
45c6d1382e
|
@ -49,7 +49,7 @@ automatically new claims based on incoming emails.
|
|||
'crm_claim_demo.xml',
|
||||
],
|
||||
'test': ['test/process/claim.yml',
|
||||
'test/ui/onchange_events.yml'],
|
||||
'test/ui/claim_demo.yml'],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate' : '00612027414703404749',
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
-
|
||||
I create claim record to call of partner onchange method.
|
||||
-
|
||||
!record {model: crm.claim, id: crm_case_claim04}:
|
||||
name: 'Damaged Product'
|
||||
partner_id: base.res_partner_6
|
||||
-
|
||||
I Update the message for claim.
|
||||
-
|
||||
!python {model: crm.claim}: |
|
||||
try:
|
||||
self.message_update(cr, uid,[ref('crm_case_claim04')], {'subject': 'Claim Update record','body_text': 'first training session completed',})
|
||||
except:
|
||||
pass
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
-
|
||||
I call onchange_event to change partner on claim form.
|
||||
-
|
||||
!python {model: crm.claim}: |
|
||||
partner_onchange = self.onchange_partner_id(cr, uid, [ref('crm_case_claim04')], ref('base.res_partner_10'))
|
||||
assert partner_onchange['value']['partner_phone'] == "+33-658-256545" ,"Phone number is wrong"
|
||||
assert partner_onchange['value']['email_from'] == 'l.dupont@tecsas.fr' ,"Email address is wrong"
|
||||
|
||||
-
|
||||
I call onchange event to change contact details on claim form.
|
||||
-
|
||||
!python {model: crm.claim}: |
|
||||
self.onchange_partner_address_id(cr, uid, ref('crm_case_claim04'), ref("base.res_partner_address_notsotinysarl0"), email=False)
|
||||
-
|
||||
I Update the message for claim.
|
||||
-
|
||||
!python {model: crm.claim}: |
|
||||
try:
|
||||
self.message_update(cr, uid,[ref('crm_case_claim04')], {'subject': 'Claim Update record','body_text': 'first training session completed',})
|
||||
except:
|
||||
pass
|
||||
|
Loading…
Reference in New Issue