[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

@ -79,23 +79,11 @@
self.action_apply(cr, uid, [ref('crm_lead2opportunity_stonage_0')], {'active_id': ref('crm_lead_newcustomer0')}) 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 In order to check the opportunity is created or not, I check type.
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.
- -
!python {model: crm.lead}: | !python {model: crm.lead}: |
lead = self.browse(cr, uid, ref("crm_lead_newcustomer0")) lead = self.browse(cr, uid, ref("crm_lead_newcustomer0"))
obj_opportunity = self.pool.get('crm.lead') assert lead.type == 'opportunity'
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
#- #-
# | # |

View File

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

View File

@ -33,22 +33,19 @@
- -
!python {model: crm.phonecall2opportunity}: | !python {model: crm.phonecall2opportunity}: |
self.action_apply(cr, uid, [ref("crm_phonecall2opportunity_interviewcall0")], {"active_id": ref("crm_phonecall_interviewcall0")}) 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 I can see that a business opportunity is now assigned to this phonecall
- -
!assert {model: crm.phonecall, id: crm_phonecall_interviewcall0}: !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 And I check that the phonecall and the newly created business opportunity is linked
to same partner to same partner
- -
!python {model: crm.phonecall}: | !python {model: crm.phonecall}: |
xid= ref('crm_phonecall_interviewcall0') obj_phonecall = self.browse(cr, uid, ref('crm_phonecall_interviewcall0'))
obj_phonecall = self.browse(cr, uid, xid)
ids = self.pool.get('crm.lead').search(cr, uid, [('name', '=', obj_phonecall.opportunity_id.name)]) 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] obj_opp = self.pool.get('crm.lead').browse(cr, uid, ids)[0]
assert obj_phonecall.partner_id == obj_opp.partner_id assert obj_phonecall.partner_id == obj_opp.partner_id
@ -78,12 +75,6 @@
rrule_type: weekly rrule_type: weekly
state: open 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 In order to schedule other phonecall to the partner
I click on "schedule other call" button. and plan for other call I click on "schedule other call" button. and plan for other call

View File

@ -20,11 +20,6 @@
- -
!assert {model: crm.claim, id: crm_claim_damagedproduct0}: !assert {model: crm.claim, id: crm_claim_damagedproduct0}:
- state == 'draft' - 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 I can change that stage by next button right on it
- -

View File

@ -21,18 +21,9 @@
- -
!python {model: crm.helpdesk}: | !python {model: crm.helpdesk}: |
self.case_open(cr, uid, [ref('crm_helpdesk_somefunctionalquestion0')]) 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 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. I close this HelpDesk Request by clicking on "Close" button.
- -
!python {model: crm.helpdesk}: | !python {model: crm.helpdesk}: |
self.case_close(cr, uid, [ref('crm_helpdesk_somefunctionalquestion0')]) self.case_close(cr, uid, [ref('crm_helpdesk_somefunctionalquestion0')])
-