[ADD, REF]: crm: 1) Moved test_crm_meeting.yml to process/process_crm_meeting.yml

2) Used demo data from xml file instead of created yml data,
3) Improved all string regarding to end user and remove all string like coder,
4) Added confirm state and done state of meeting and cheked its worked or not

bzr revid: ron@tinyerp.com-20111011100649-wmokfc1tiknua2zz
This commit is contained in:
ron@tinyerp.com 2011-10-11 15:36:49 +05:30
parent d202549512
commit 618fc88e33
3 changed files with 73 additions and 98 deletions

View File

@ -121,7 +121,7 @@ Creates a dashboard for CRM that includes:
'test': [
'test/process/process_crm_lead.yml',
'test/process/cancle_crm_lead.yml',
'test/test_crm_meeting.yml',
'test/process/process_crm_meeting.yml',
'test/test_crm_opportunity.yml',
'test/test_crm_phonecall.yml',
'test/test_crm_recurrent_meeting.yml',

View File

@ -0,0 +1,72 @@
- |
Customer want to do initial discussion with us so we will arrage meeting or
phonecalles or internal Meeting with them.
-
!assert {model: crm.meeting, id: crm.crm_case_initialdiscussion0}:
- state == "draft"
- |
For Remember purpose for meeting, i put reminder "30 minutes before" and assign
to meeting.
-
!python {model: crm.meeting}: |
self.write(cr, uid, [ref('crm_case_initialdiscussion0')], {'alarm_id': ref("base_calendar.alarm5")})
- |
In order to check recurrence on meetings I will set Recurrency to Custom
and I set the fields so that the meeting will occur weekly on Monday to Friday 10 times.
-
!python {model: crm.meeting}: |
self.write(cr, uid, [ref("crm_case_initialdiscussion0")], {'fr': 1, 'mo': 1, 'th': 1, 'tu': 1, 'we':1, 'count':10, 'interval': 1, 'rrule_type': 'weekly'})
- |
The meeting is scheduled on Monday and Friday for 10 times so i can see from the calendar view
-
!python {model: crm.meeting}: |
self.fields_view_get(cr, uid, False, 'calendar', context)
- |
We can check for one of the recurrent event and count the number of meeting.
-
!python {model: crm.meeting}: |
import time
from datetime import datetime, date, timedelta
ids = self.search(cr, uid, [('date', '>=', time.strftime('%Y-%m-%d 00:00:00')), ('date', '<=', (datetime.now()+timedelta(31)).strftime('%Y-%m-%d 00:00:00')), ('name', '=', 'Initial discussion')], context={'virtual_id': True})
assert len(ids) == 10
- |
If I want to edit meetings information for all occurrence I click on "Edit All" button.
-
!python {model: crm.meeting}: |
self.write(cr, uid, [ref('crm_case_initialdiscussion0')], {'edit_all':'True'},context)
- |
I can see that new meeting form is opened with same value.
I change some data for meeting and save it.
I can see from meeting's calendar view that all meeting occurrences are changed accordingly.
-
!record {model: crm.meeting, id: crm.crm_case_initialdiscussion0}:
alarm_id: base_calendar.alarm9
rrule_type: weekly
- |
In order to invite people(internal user) for this meetings, Create record for
people will come on meeting.
-
!record {model: base_calendar.invite.attendee, id: base_calendar_invite_attendee_0}:
type: internal
send_mail: False
partner_id: base.res_partner_9
user_ids:
- base.user_demo
-
Now inviting those people which we are registers.
-
!python {model: base_calendar.invite.attendee}: |
self.do_invite(cr, uid, [ref('base_calendar_invite_attendee_0')], {'active_id': ref('crm_case_initialdiscussion0'), 'model' : 'crm.meeting', 'attendee_field':'attendee_ids'})
- |
All conformation is completed for meeting now going to confirm meeting
and we can check also after completion of meeting, it is done or not.
-
!python {model: crm.meeting}: |
self.case_open(cr, uid, [ref('crm_case_initialdiscussion0')])
meeting_rec = self.browse(cr, uid, ref("crm_case_initialdiscussion0"))
assert meeting_rec.state == 'open', "Meeting is not in confirm state"
self.case_close(cr, uid, [ref('crm_case_initialdiscussion0')])
meeting_rec_close = self.browse(cr, uid, ref("crm_case_initialdiscussion0"))
assert meeting_rec_close.state == 'done', "Meeting is not in done state"

View File

@ -1,97 +0,0 @@
- |
I will test Meetings which may be customer meeting or phonecall meeting or
internal Meeting.
- |
I start by creating a new Meeting.
-
!record {model: crm.meeting, id: crm_meeting_regardingpresentation0}:
categ_id: crm.categ_meet2
date: !eval time.strftime('%Y-%m-%d 16:04:00')
date_deadline: !eval "(datetime.now() + timedelta(1)).strftime('%Y-%m-%d 00:04:00')"
duration: 8.0
email_from: info@balmerinc.be
location: Ahmedabad
name: Regarding Presentation
partner_address_id: base.res_partner_address_1
partner_id: base.res_partner_9
rrule_type: weekly
section_id: crm.section_sales_department
- |
I check that the Meetings is in 'UnConfirmed' state.
-
!assert {model: crm.meeting, id: crm_meeting_regardingpresentation0}:
- state == "draft"
- |
I can set reminder on meeting if I put reminder "40 minutes before" .
- |
For that, I first create alarm.
-
!record {model: res.alarm, id: res_alarm_minituesbefore0}:
name: 40 minutes before
trigger_duration: 40
trigger_interval: minutes
trigger_occurs: before
trigger_related: start
- |
I will assign this reminder.
- !python {model: crm.meeting}: |
self.write(cr, uid, [ref('crm_meeting_regardingpresentation0')], {'alarm_id': ref("res_alarm_minituesbefore0")})
- |
In order to check recurrence on meetings I will set Recurrency to Custom
and I set the fields so that the meeting will occur weekly on Monday and Friday 10 times.
-
!python {model: crm.meeting}: |
self.write(cr, uid, [ref("crm_meeting_regardingpresentation0")], {'fr': 1, 'mo': 1, 'th': 1, 'tu': 1, 'we':1, 'count':10, 'interval': 1, 'rrule_type': 'weekly'})
- |
I can see from the calendar view that the meeting is scheduled on Monday and Friday
for 10 times.
-
!python {model: crm.meeting}: |
self.fields_view_get(cr, uid, False, 'calendar', context)
- |
I will search for one of the recurrent event and count the number of meeting.
-
!python {model: crm.meeting}: |
import time
from datetime import datetime, date, timedelta
ids = self.search(cr, uid, [('date', '>=', time.strftime('%Y-%m-%d 00:00:00')), ('date', '<=', (datetime.now()+timedelta(31)).strftime('%Y-%m-%d 00:00:00')), ('name', '=', 'Regarding Presentation')], context={'virtual_id': True})
assert len(ids) == 10
- |
If I want to edit meetings information for all occurrence I click on "Edit All" button.
-
!python {model: crm.meeting}: |
self.write(cr, uid, [ref('crm_meeting_regardingpresentation0')], {'edit_all':'True'},context)
- |
I can see that new meeting form is opened with same value.
I change some data for meeting and save it.
I can see from meeting's calendar view that all meeting occurrences are changed accordingly.
-
!record {model: crm.meeting, id: crm.crm_meeting_regardingpresentation0}:
alarm_id: base_calendar.alarm9
rrule_type: weekly
- |
In order to invite people for this meetings, I click on "Invite People" button
I can invite internal user.
-
!record {model: base_calendar.invite.attendee, id: base_calendar_invite_attendee_0}:
type: internal
send_mail: False
partner_id: base.res_partner_9
user_ids:
- base.user_demo
-
I click on "Invite" button of "Invite attendee" wizard.
-
!python {model: base_calendar.invite.attendee}: |
self.do_invite(cr, uid, [ref('base_calendar_invite_attendee_0')], {'active_id': ref('crm_meeting_regardingpresentation0'), 'model' : 'crm.meeting', 'attendee_field':'attendee_ids'})
- |
After direct/indirect confirmation for meetings I can confirm meeting.
-
!python {model: crm.meeting}: |
self.case_open(cr, uid, [ref('crm_meeting_regardingpresentation0')])