[IMP]: crm*: Improved xml_id of demo phonecalls so it can be generic

bzr revid: rpa@tinyerp.com-20120730102947-l10htd1qpqfbmchp
This commit is contained in:
Rucha (Open ERP) 2012-07-30 15:59:47 +05:30
parent f10270c64a
commit a6b7f2d146
4 changed files with 20 additions and 20 deletions

View File

@ -4,7 +4,7 @@
<!--
((((((((((( Demo Cases )))))))))))
-->
<record id="crm_case_phone01" model="crm.phonecall">
<record id="crm_phonecall_1" model="crm.phonecall">
<field eval="time.strftime('%Y-%m-04 10:45:36')" name="date"/>
<field name="partner_id" ref="base.res_partner_11"/>
<field eval="&quot;3&quot;" name="priority"/>
@ -19,7 +19,7 @@
<field eval="2.3" name="duration"/>
<field eval="&quot;done&quot;" name="state"/>
</record>
<record id="crm_case_phone02" model="crm.phonecall">
<record id="crm_phonecall_2" model="crm.phonecall">
<field eval="time.strftime('%Y-%m-11 11:19:25')" name="date"/>
<field name="partner_id" ref="base.res_partner_6"/>
<field eval="&quot;4&quot;" name="priority"/>
@ -34,7 +34,7 @@
<field eval="1.5" name="duration"/>
<field eval="&quot;done&quot;" name="state"/>
</record>
<record id="crm_case_phone03" model="crm.phonecall">
<record id="crm_phonecall_3" model="crm.phonecall">
<field eval="time.strftime('%Y-%m-15 17:44:12')" name="date"/>
<field name="partner_id" ref="base.res_partner_10"/>
<field eval="&quot;2&quot;" name="priority"/>
@ -50,7 +50,7 @@
<field eval="5.0" name="duration"/>
<field eval="&quot;done&quot;" name="state"/>
</record>
<record id="crm_case_phone04" model="crm.phonecall">
<record id="crm_phonecall_4" model="crm.phonecall">
<field eval="time.strftime('%Y-%m-21 14:10:23')" name="date"/>
<field name="partner_id" ref="base.res_partner_18"/>
<field eval="&quot;3&quot;" name="priority"/>
@ -64,7 +64,7 @@
<field eval="&quot;(514) 698-4118&quot;" name="partner_phone"/>
<field eval="3.45" name="duration"/>
</record>
<record id="crm_case_phone05" model="crm.phonecall">
<record id="crm_phonecall_5" model="crm.phonecall">
<field eval="time.strftime('%Y-%m-28 16:20:43')" name="date"/>
<field name="partner_id" ref="base.res_partner_5"/>
<field eval="&quot;3&quot;" name="priority"/>
@ -78,7 +78,7 @@
<field eval="&quot;(855) 924-4364&quot;" name="partner_phone"/>
<field eval="2.08" name="duration"/>
</record>
<record id="crm_case_phone06" model="crm.phonecall">
<record id="crm_phonecall_6" model="crm.phonecall">
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="&quot;Bad time&quot;" name="name"/>

View File

@ -44,14 +44,14 @@
I convert one phonecall request as a customer and put into regular customer list.
-
!python {model: crm.phonecall2partner}: |
context.update({'active_model': 'crm.phonecall', 'active_ids': [ref("crm.crm_case_phone06")], 'active_id': ref("crm.crm_case_phone06")})
context.update({'active_model': 'crm.phonecall', 'active_ids': [ref("crm.crm_phonecall_6")], 'active_id': ref("crm.crm_phonecall_6")})
new_id = self.create(cr, uid, {}, context=context)
self.make_partner(cr, uid, [new_id], context=context)
-
I check converted phonecall to partner.
-
!python {model: res.partner}: |
partner_id = self.search(cr, uid, [('phonecall_ids', '=', ref('crm.crm_case_phone06'))])
partner_id = self.search(cr, uid, [('phonecall_ids', '=', ref('crm.crm_phonecall_6'))])
assert partner_id, "Customer is not found in regular customer list."
data = self.browse(cr, uid, partner_id, context=context)[0]
assert data.user_id.id == ref("base.user_root"), "User not assign properly"

View File

@ -9,7 +9,7 @@
I make another opportunity from phonecall for same customer.
-
!python {model: crm.phonecall2opportunity}: |
context.update({'active_model': 'crm.phonecall', 'active_ids': [ref("crm.crm_case_phone06")]})
context.update({'active_model': 'crm.phonecall', 'active_ids': [ref("crm.crm_phonecall_6")]})
res_id = self.create(cr, uid, {'name': "Quoi de prix de votre autre service?", 'partner_id': ref("base.res_partner_9")}, context=context)
self.make_opportunity(cr, uid, [res_id], context=context)
-
@ -36,51 +36,51 @@
Now I schedule another phonecall to customer after merged.
-
!python {model: crm.phonecall2phonecall}: |
context.update({'active_model': 'crm.phonecall', 'active_ids': [ref("crm.crm_case_phone06")], 'active_id': ref("crm.crm_case_phone06")})
context.update({'active_model': 'crm.phonecall', 'active_ids': [ref("crm.crm_phonecall_6")], 'active_id': ref("crm.crm_phonecall_6")})
res_id = self.create(cr, uid, {'name': "vos chances sont fusionnés en un seul"}, context=context)
self.action_schedule(cr, uid, [res_id], context=context)
-
I schedule meeting on this phonecall.
-
!python {model: crm.phonecall}: |
self.action_make_meeting(cr, uid, [ref("crm.crm_case_phone06")])
self.action_make_meeting(cr, uid, [ref("crm.crm_phonecall_6")])
-
I set phone call to not held.
-
!python {model: crm.phonecall}: |
self.case_pending(cr, uid, [ref("crm.crm_case_phone06")])
self.case_pending(cr, uid, [ref("crm.crm_phonecall_6")])
-
I check that the phone call is in 'Not Held' state.
-
!assert {model: crm.phonecall, id: crm.crm_case_phone06, string: Phone call held.}:
!assert {model: crm.phonecall, id: crm.crm_phonecall_6, string: Phone call held.}:
- state == "pending"
-
I cancelled the phone call.
-
!python {model: crm.phonecall}: |
self.case_cancel(cr, uid, [ref("crm.crm_case_phone06")])
self.case_cancel(cr, uid, [ref("crm.crm_phonecall_6")])
-
I check that the phone call is in 'Cancelled' state.
-
!assert {model: crm.phonecall, id: crm.crm_case_phone06, string: Phone call is not cancelled.}:
!assert {model: crm.phonecall, id: crm.crm_phonecall_6, string: Phone call is not cancelled.}:
- state == "cancel"
-
I reset the phone call.
-
!python {model: crm.phonecall}: |
self.case_reset(cr, uid, [ref("crm.crm_case_phone06")])
self.case_reset(cr, uid, [ref("crm.crm_phonecall_6")])
-
I check that the phone call is reset or not.
-
!assert {model: crm.phonecall, id: crm.crm_case_phone06, string: Phone call is not reset.}:
!assert {model: crm.phonecall, id: crm.crm_phonecall_6, string: Phone call is not reset.}:
- state == "open"
-
I set phone call to held (done).
-
!python {model: crm.phonecall}: |
self.case_close(cr, uid, [ref("crm.crm_case_phone06")])
self.case_close(cr, uid, [ref("crm.crm_phonecall_6")])
-
I check that the phone call is in 'Held' state.
-
!assert {model: crm.phonecall, id: crm.crm_case_phone06, string: Phone call is not held.}:
!assert {model: crm.phonecall, id: crm.crm_phonecall_6, string: Phone call is not held.}:
- state == "done"

View File

@ -18,7 +18,7 @@
-
I create phonecall record to call partner onchange method.
-
!record {model: crm.phonecall, id: crm_case_phone05}:
!record {model: crm.phonecall, id: crm_phonecall_5}:
name: 'Bad time'
partner_id: base.res_partner_5
-