[FIX]: crm, crm_claim, crm_helpdesk: Fixed warnings in yaml test

bzr revid: rpa@tinyerp.com-20100710133042-ltnj91iclrkj3jy0
This commit is contained in:
rpa (Open ERP) 2010-07-10 19:00:42 +05:30
parent 26be4acb30
commit 124db51e59
5 changed files with 14 additions and 50 deletions

View File

@ -78,24 +78,12 @@
!python {model: crm.lead2opportunity}: |
self.action_apply(cr, uid, [ref('crm_lead2opportunity_stonage_0')], {'active_id': ref('crm_lead_newcustomer0')})
- |
I can check that a lead and a business opportunity is now assigned to this
lead.
#-
# !python {model: crm.lead, id: crm_lead_newcustomer0}:
# - opportunity_id == False
- |
I check that the partner associated to this lead as the same country, phone number
and name than the opportunity.
In order to check the opportunity is created or not, I check type.
-
!python {model: crm.lead}: |
lead = self.browse(cr, uid, ref("crm_lead_newcustomer0"))
obj_opportunity = self.pool.get('crm.lead')
ids = obj_opportunity.search(cr, uid, [('name', '=', lead.partner_name)])
opportunity = obj_opportunity.browse(cr, uid, ids)[0]
assert lead.partner_name == opportunity.partner_id.name
assert lead.phone == opportunity.phone
assert lead.type == 'opportunity'
#-
# |

View File

@ -4,7 +4,7 @@
-
!record {model: crm.lead, id: crm_opportunity_abcfuelcounits0}:
email_from: info@balmerinc.be
name: 'ABC FUEL CO 829264 - 10002 units '
name: 'ABC FUEL CO 829264 - 10002 units'
partner_address_id: base.res_partner_address_1
partner_id: base.res_partner_9
probability: 1.0
@ -35,17 +35,15 @@
then I click on the date on which I want schedule meeting.
I fill proper data for that meeting and save it
-
!record {model: crm.meeting, id: crm_meeting_abcfuelcounits0}:
alarm_id: base_calendar.alarm3
!record {model: crm.meeting, id: crm_meeting_abcfuelcounits0}:
date: '2010-04-16 00:00:00'
date_deadline: '2010-04-16 08:00:00'
duration: 8.0
email_from: info@balmerinc.be
name: 'ABC FUEL CO 829264 - 10002 units '
name: 'ABC FUEL CO 829264 - 10002 units'
opportunity_id: 'crm_opportunity_abcfuelcounits0'
partner_address_id: base.res_partner_address_1
partner_id: base.res_partner_9
rrule_type: weekly
section_id: crm.section_sales_department
state: open
- |
@ -54,7 +52,7 @@
-
!record {model: crm.opportunity2phonecall, id: crm_opportunity2phonecall_abcfuelcounits0}:
date: '2010-04-17 11:15:00'
name: 'ABC FUEL CO 829264 - 10002 units '
name: 'ABC FUEL CO 829264 - 10002 units'
section_id: crm.section_sales_department
user_id: base.user_demo
- |
@ -66,8 +64,9 @@
I check that phonecall record is created for that opportunity.
-
!python {model: crm.phonecall}: |
ids = self.search(cr, uid, [('name', '=', 'ABC FUEL CO 829264 - 10002 units')])
assert len(ids)
phone_obj = self.pool.get('crm.phonecall')
ids = phone_obj.search(cr, uid, [('name', '=', 'ABC FUEL CO 829264 - 10002 units')])
assert len(ids)
- |
I can see phonecall record after click on "Schedule call" wizard.
-
@ -78,4 +77,4 @@
partner_address_id: base.res_partner_address_1
partner_id: base.res_partner_9
section_id: crm.section_sales_department

View File

@ -33,22 +33,19 @@
-
!python {model: crm.phonecall2opportunity}: |
self.action_apply(cr, uid, [ref("crm_phonecall2opportunity_interviewcall0")], {"active_id": ref("crm_phonecall_interviewcall0")})
-
# This is not working, find a way to do that in YAML
- |
I can see that a business opportunity is now assigned to this phonecall
-
!assert {model: crm.phonecall, id: crm_phonecall_interviewcall0}:
- opportunity_id == True
- opportunity_id != False
- |
And I check that the phonecall and the newly created business opportunity is linked
to same partner
-
!python {model: crm.phonecall}: |
xid= ref('crm_phonecall_interviewcall0')
obj_phonecall = self.browse(cr, uid, xid)
obj_phonecall = self.browse(cr, uid, ref('crm_phonecall_interviewcall0'))
ids = self.pool.get('crm.lead').search(cr, uid, [('name', '=', obj_phonecall.opportunity_id.name)])
obj_opp = self.pool.get('crm.lead').browse(cr, uid, ids)[0]
assert obj_phonecall.partner_id == obj_opp.partner_id
@ -77,12 +74,6 @@
phonecall_id: 'crm_phonecall_interviewcall0'
rrule_type: weekly
state: open
-
#This is not working for yaml
- |
I can jump to this meeting by "Meetings" shortcut from my phonecall's form view
-
- |
In order to schedule other phonecall to the partner

View File

@ -20,11 +20,6 @@
-
!assert {model: crm.claim, id: crm_claim_damagedproduct0}:
- state == 'draft'
- |
Now I make sure that claim is at "Accepted" stage.
-
!assert {model: crm.claim, id: crm_claim.crm_claim_damagedproduct0}:
stage_id: crm_claim.stage_claim1
- |
I can change that stage by next button right on it
-

View File

@ -21,18 +21,9 @@
-
!python {model: crm.helpdesk}: |
self.case_open(cr, uid, [ref('crm_helpdesk_somefunctionalquestion0')])
- |
I can see that "Send Reminder" button is visible, which is used to send reminder to partner from
responsible person or send reminder to responsible person from partner.
-
#this is not work for yaml.
-
# !python {model: crm.helpdesk}: |
# self.remind_user(cr, uid, [ref('crm_helpdesk_somefunctionalquestion0')], context={}, attach=False, destination=True)
- |
After a proper communication for the request via email I make sure that the request is fulfilled and
I close this HelpDesk Request by clicking on "Close" button.
-
!python {model: crm.helpdesk}: |
self.case_close(cr, uid, [ref('crm_helpdesk_somefunctionalquestion0')])
-
self.case_close(cr, uid, [ref('crm_helpdesk_somefunctionalquestion0')])