diff --git a/addons/base_calendar/__openerp__.py b/addons/base_calendar/__openerp__.py
index e8b528db1a3..44c36997495 100755
--- a/addons/base_calendar/__openerp__.py
+++ b/addons/base_calendar/__openerp__.py
@@ -40,6 +40,7 @@
'wizard/base_calendar_invite_attendee_view.xml',
'base_calendar_view.xml'
],
+ "test" : ['test/base_calendar_test.yml'],
"installable" : True,
"active" : False,
}
diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py
index 4bebc274705..7d3b43664ed 100644
--- a/addons/base_calendar/base_calendar.py
+++ b/addons/base_calendar/base_calendar.py
@@ -469,6 +469,7 @@ property or property parameter."),
reply_to=email_from
)
return True
+
def onchange_user_id(self, cr, uid, ids, user_id, *args, **argv):
"""
Make entry on email and availbility on change of user_id field.
@@ -795,7 +796,26 @@ class calendar_event(osv.osv):
def _tz_get(self, cr, uid, context={}):
return [(x.lower(), x) for x in pytz.all_timezones]
- def onchange_dates(self, cr, uid, ids, start_date, duration=False, end_date=False, context={}):
+ def onchange_allday(self, cr, uid, ids, allday, context={}):
+ """
+ @param self: The object pointer
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param ids: List of calendar event’s IDs.
+ @param allday: Value of allday boolean
+ @param context: A standard dictionary for contextual values
+ """
+ if not allday or not ids:
+ return {}
+ event = self.browse(cr, uid, ids, context=context)[0]
+ value = {
+ 'date': event.date and event.date[:11] + '00:00:00',
+ 'date_deadline': event.date_deadline and event.date_deadline[:11] + '00:00:00',
+ 'duration': 24
+ }
+ return {'value': value}
+
+ def onchange_dates(self, cr, uid, ids, start_date, duration=False, end_date=False, allday=False, context={}):
"""
@param self: The object pointer
@param cr: the current row, from the database cursor,
@@ -805,14 +825,23 @@ class calendar_event(osv.osv):
@param duration: Get Duration between start date and end date or False
@param end_date: Get Ending Date or False
@param context: A standard dictionary for contextual values
-
"""
- if not start_date:
- return {}
value = {}
+ if not start_date:
+ return value
if not end_date and not duration:
duration = 8.00
- value['duration'] = 8.00
+ value['duration'] = duration
+
+ if allday: # For all day event
+ start = start_date[:11] + '00:00:00'
+ value = {
+ 'date': start,
+ 'date_deadline': start,
+ 'duration': 24
+ }
+ return {'value': value}
+
start = datetime.strptime(start_date, "%Y-%m-%d %H:%M:%S")
if end_date and not duration:
end = datetime.strptime(end_date, "%Y-%m-%d %H:%M:%S")
@@ -822,6 +851,7 @@ class calendar_event(osv.osv):
elif not end_date:
end = start + timedelta(hours=duration)
value['date_deadline'] = end.strftime("%Y-%m-%d %H:%M:%S")
+
return {'value': value}
def _set_rrulestring(self, cr, uid, id, name, value, arg, context):
@@ -998,8 +1028,12 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
('3', 'Third'), ('4', 'Fourth'), \
('5', 'Fifth'), ('-1', 'Last')], 'By day'),
'month_list': fields.selection(months.items(), 'Month'),
- 'end_date': fields.date('Repeat Until')
+ 'end_date': fields.date('Repeat Until'),
+ 'attendee_ids': fields.many2many('calendar.attendee', 'event_attendee_rel',\
+ 'event_id', 'attendee_id', 'Attendees'),
+ 'allday': fields.boolean('All Day')
}
+
_defaults = {
'class': lambda *a: 'public',
'show_as': lambda *a: 'busy',
@@ -1007,6 +1041,46 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
'select1': lambda *x: 'date',
'interval': lambda *x: 1,
}
+
+ def open_event(self, cr, uid, ids, context=None):
+ """
+ Open Event From for Editing
+ @param cr: the current row, from the database cursor,
+ @param uid: the current user’s ID for security checks,
+ @param ids: List of event’s IDs
+ @param context: A standard dictionary for contextual values
+ @return: Dictionary value which open Crm Meeting form.
+ """
+ if not context:
+ context = {}
+
+ data_obj = self.pool.get('ir.model.data')
+
+ value = {}
+
+ id2 = data_obj._get_id(cr, uid, 'base_calendar', 'event_form_view')
+ id3 = data_obj._get_id(cr, uid, 'base_calendar', 'event_tree_view')
+ id4 = data_obj._get_id(cr, uid, 'base_calendar', 'event_calendar_view')
+ if id2:
+ id2 = data_obj.browse(cr, uid, id2, context=context).res_id
+ if id3:
+ id3 = data_obj.browse(cr, uid, id3, context=context).res_id
+ if id4:
+ id4 = data_obj.browse(cr, uid, id4, context=context).res_id
+ for id in ids:
+ value = {
+ 'name': _('Event'),
+ 'view_type': 'form',
+ 'view_mode': 'form,tree',
+ 'res_model': 'calendar.event',
+ 'view_id': False,
+ 'views': [(id2, 'form'), (id3, 'tree'), (id4, 'calendar')],
+ 'type': 'ir.actions.act_window',
+ 'res_id': base_calendar_id2real_id(id),
+ 'nodestroy': True
+ }
+
+ return value
def modify_this(self, cr, uid, event_id, defaults, real_date, context=None, *args):
"""
@@ -1085,8 +1159,8 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
count = 0
for data in cr.dictfetchall():
- start_date = base_start_date and datetime.strptime(base_start_date, "%Y-%m-%d") or False
- until_date = base_until_date and datetime.strptime(base_until_date, "%Y-%m-%d") or False
+ start_date = base_start_date and datetime.strptime(base_start_date[:10], "%Y-%m-%d") or False
+ until_date = base_until_date and datetime.strptime(base_until_date[:10], "%Y-%m-%d") or False
if count > limit:
break
event_date = datetime.strptime(data['date'], "%Y-%m-%d %H:%M:%S")
@@ -1124,7 +1198,6 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
new_rule = '%s=%s' % (name, value)
new_rrule_str.append(new_rule)
new_rrule_str = ';'.join(new_rrule_str)
- start_date = datetime.strptime(data['date'], "%Y-%m-%d %H:%M:%S")
rdates = get_recurrent_dates(str(new_rrule_str), exdate, start_date)
for rdate in rdates:
r_date = datetime.strptime(rdate, "%Y-%m-%d %H:%M:%S")
@@ -1216,8 +1289,12 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
args_without_date.append(arg)
else:
if arg[1] in ('>', '>='):
+ if start_date:
+ continue
start_date = arg[2]
elif arg[1] in ('<', '<='):
+ if until_date:
+ continue
until_date = arg[2]
res = super(calendar_event, self).search(cr, uid, args_without_date, \
offset, limit, order, context, count)
@@ -1261,7 +1338,6 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
context.update({'alarm_id': vals.get('alarm_id')})
alarm_obj.do_alarm_create(cr, uid, new_ids, self._name, 'date', \
context=context)
-
return res
def browse(self, cr, uid, ids, context=None, list_class=None, fields_process={}):
diff --git a/addons/base_calendar/base_calendar_data.xml b/addons/base_calendar/base_calendar_data.xml
index c8b20ac134b..a69a2f6cd9d 100755
--- a/addons/base_calendar/base_calendar_data.xml
+++ b/addons/base_calendar/base_calendar_data.xml
@@ -1,7 +1,12 @@
-
+
+
+ Event
+ calendar.event
+
+
1 minute before
diff --git a/addons/base_calendar/base_calendar_view.xml b/addons/base_calendar/base_calendar_view.xml
index c54693ef866..2a48c0be32f 100755
--- a/addons/base_calendar/base_calendar_view.xml
+++ b/addons/base_calendar/base_calendar_view.xml
@@ -71,7 +71,7 @@
-
+
@@ -100,8 +100,30 @@
+
+
+
+ Event Invitations
+ ir.actions.act_window
+ calendar.attendee
+ form
+ tree,form
+
+ {'default_sent_by_uid': uid}
+
+
+
+
+
+
+
-
+
+
+ res.alarm.formres.alarmform
@@ -121,36 +143,230 @@
-
- res.alarm.tree
- res.alarm
- tree
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ res.alarm.tree
+ res.alarm
+ tree
+
+
+
+
+
+
+
+
+
+
+
+
+ Available Alarmsir.actions.act_windowres.alarmformtree,form
-
-
-
-
+
-
-
+
+
+
+ Event Form
+ calendar.event
+ form
+
+
+
+
+
+
+
+
+ Event Tree
+ calendar.event
+ tree
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Events Calendar
+ calendar.event
+ calendar
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Events
+ ir.actions.act_window
+ calendar.event
+ form
+ tree,form,calendar
+
+
+
+
+
+
+
diff --git a/addons/base_calendar/test/base_calendar_test.yml b/addons/base_calendar/test/base_calendar_test.yml
new file mode 100644
index 00000000000..14bf162f23a
--- /dev/null
+++ b/addons/base_calendar/test/base_calendar_test.yml
@@ -0,0 +1,77 @@
+- |
+ In Order to test base_calendar, I will first create One Simple Event with real data
+-
+ !record {model: calendar.event, id: calendar_event_technicalpresentation0}:
+ class: private
+ date: '2010-04-30 16:00:00'
+ date_deadline: '2010-04-30 18:30:00'
+ description: The Technical Presentation will cover following topics:\n* Creating OpenERP
+ class\n* Views\n* Wizards\n* Workflows
+ duration: 2.5
+ location: OpenERP S.A.
+ name: Technical Presentation
+ rrule_type: none
+- |
+ Now I will set recurrence for this event to occure monday and friday of week
+-
+ !python {model: calendar.event}: |
+ self.write(cr, uid, [ref("calendar_event_technicalpresentation0")], {'fr': 1, 'mo': 1, 'interval': 1, 'freq': 'weekly', 'rrule_type': 'custom'})
+- |
+ In order to check that recurrent events are views successfully in calenadar view,
+ I will open calendar view of events
+-
+ !python {model: calendar.event}: |
+ self.fields_view_get(cr, uid, False, 'calendar', context)
+- |
+ In order to check that recurrent events are views successfully in calenadar view,
+ I will search for one of the recurrent event and count the number of events
+-
+ !python {model: calendar.event}: |
+ ids = self.search(cr, uid, [('date', '>=', '2010-05-01 00:00:00'), ('date', '<=', '2010-05-31 00:00:00')] )
+ assert len(ids) == 9
+- |
+ Now I will make All day event and test it
+-
+ !record {model: calendar.event, id: calendar_event_alldaytestevent0}:
+ allday: 1
+ class: confidential
+ date: '2010-04-30 00:00:00'
+ date_deadline: '2010-04-30 00:00:00'
+ description: 'All day technical test '
+ location: School
+ name: All day test event
+ rrule_type: none
+- |
+ In order to check reminder I will first create reminder
+-
+ !record {model: res.alarm, id: res_alarm_daybeforeeventstarts0}:
+ name: 1 Day before event starts
+ trigger_duration: 1
+ trigger_interval: days
+ trigger_occurs: before
+ trigger_related: start
+- |
+ Now I will assign this reminder to all day event
+-
+ !python {model: calendar.event}: |
+ self.write(cr, uid, [ref("calendar_event_alldaytestevent0")], {'alarm_id': ref("res_alarm_daybeforeeventstarts0")})
+- |
+ In order to assign attendee I will invite Demo user
+-
+ !record {model: base_calendar.invite.attendee, id: base_calendar_invite_attendee_0}:
+ type: internal
+ partner_id: base.res_partner_9 # Put bcz of problem in read
+ user_ids:
+ - base.user_demo
+- |
+ Then I click on Invite Button
+-
+ !python {model: base_calendar.invite.attendee}: |
+ self.do_invite(cr, uid, [ref("base_calendar_invite_attendee_0")], {'active_id': ref("calendar_event_alldaytestevent0"), 'model' : 'calendar.event', 'attendee_field':'attendee_ids'})
+- |
+ Now I will Accept this invitation
+-
+ !python {model: calendar.attendee}: |
+ ids = self.search(cr, uid, [('ref', '=', 'calendar.event' + ',' + str(ref("calendar_event_alldaytestevent0")))])
+ if ids:
+ self.do_accept(cr, uid, ids, context=context)
diff --git a/addons/crm/crm.py b/addons/crm/crm.py
index a7ff5eedfe9..cefd1b42d3a 100644
--- a/addons/crm/crm.py
+++ b/addons/crm/crm.py
@@ -434,11 +434,20 @@ class crm_case(osv.osv):
"""
if not context:
context = {}
+
+ hist_obj = self.pool.get('crm.case.history')
+ log_obj = self.pool.get('crm.case.log')
for case in self.browse(cr, uid, ids, context):
if (not case.section_id.allow_unlink) and (case.state <> 'draft'):
raise osv.except_osv(_('Warning !'),
_('You can not delete this case. You should better cancel it.'))
+
+ # Also removing history and logs
+ history_ids = map(lambda x: x.id, case.history_line)
+ log_ids = map(lambda x: x.id, case.log_ids)
+ hist_obj.unlink(cr, uid, history_ids, context=context)
+ log_obj.unlink(cr, uid, log_ids, context=context)
return super(crm_case, self).unlink(cr, uid, ids, context)
def stage_next(self, cr, uid, ids, context=None):
diff --git a/addons/crm/crm_meeting.py b/addons/crm/crm_meeting.py
index e0b968a1808..495eb9f351a 100644
--- a/addons/crm/crm_meeting.py
+++ b/addons/crm/crm_meeting.py
@@ -51,7 +51,7 @@ class crm_meeting(osv.osv):
),
'phonecall_id': fields.many2one ('crm.phonecall', 'Phonecall'),
'opportunity_id': fields.many2one ('crm.opportunity', 'Opportunity'),
- 'attendee_ids': fields.many2many('calendar.attendee', 'event_attendee_rel',\
+ 'attendee_ids': fields.many2many('calendar.attendee', 'meeting_attendee_rel',\
'event_id', 'attendee_id', 'Attendees'),
'date_closed': fields.datetime('Closed', readonly=True),
'date_deadline': fields.datetime('Deadline'),
@@ -115,16 +115,13 @@ class calendar_attendee(osv.osv):
_description = 'Calendar Attendee'
def _compute_data(self, cr, uid, ids, name, arg, context):
-
"""
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@param ids: List of compute data’s IDs
@param context: A standard dictionary for contextual values
-
"""
-
name = name[0]
result = super(calendar_attendee, self)._compute_data(cr, uid, ids, name, arg, context)
@@ -132,7 +129,7 @@ class calendar_attendee(osv.osv):
id = attdata.id
result[id] = {}
if name == 'categ_id':
- if attdata.ref:
+ if attdata.ref and 'categ_id' in attdata.ref._columns:
result[id][name] = (attdata.ref.categ_id.id, attdata.ref.categ_id.name,)
else:
result[id][name] = False
diff --git a/addons/olap/__openerp__.py b/addons/olap/__openerp__.py
index 933463638cc..bdca188a08f 100644
--- a/addons/olap/__openerp__.py
+++ b/addons/olap/__openerp__.py
@@ -46,7 +46,8 @@
"data/olap_security.xml",
'security/ir.model.access.csv'
],
- "demo_xml" : ["data/olap_demo.xml"],
+ "demo_xml" : ["data/olap_demo.xml",
+ "test/olap_test00.yml"],
"active": False,
"installable": True
}
diff --git a/addons/olap/data/olap_fact_view.xml b/addons/olap/data/olap_fact_view.xml
index 0dc543ace1e..f01db863f6e 100755
--- a/addons/olap/data/olap_fact_view.xml
+++ b/addons/olap/data/olap_fact_view.xml
@@ -41,10 +41,7 @@
-
-
@@ -277,7 +274,7 @@
-
+
@@ -325,7 +322,7 @@
-
+
@@ -340,9 +337,5 @@
id="menu_view_olap_application_field_form"
parent="menu_bi_conf_known_application"/>
-
-
-
-
diff --git a/addons/olap/olap.py b/addons/olap/olap.py
index 338d61f81fa..6097c6dbf14 100644
--- a/addons/olap/olap.py
+++ b/addons/olap/olap.py
@@ -96,8 +96,8 @@ class olap_fact_database(osv.osv):
raise osv.except_osv('Error (cx_Oracle) : ', e)
except Exception,e:
- raise osv.except_osv('BI Error !', e)
-
+ raise osv.except_osv('Error !', e)
+ raise osv.except_osv('Message', 'Connection Successful !')
return True
_columns = {
diff --git a/addons/olap/test/olap_test00.yml b/addons/olap/test/olap_test00.yml
new file mode 100644
index 00000000000..af87950468f
--- /dev/null
+++ b/addons/olap/test/olap_test00.yml
@@ -0,0 +1,111 @@
+-
+ In order to check olap module which is used to configure BI from OpenERP client.I create olap fact database record.
+-
+ !record {model: olap.fact.database, id: olap_fact_database_openerp0}:
+ connection_type: port
+ db_host: localhost
+ db_login: postgres
+ db_name: tiny
+ db_password: '123456'
+ db_port: 5432
+ name: OpenERP
+ type: postgres
+-
+ I will check the connection for successful login. >>>>>>(Problem)
+# !python {model: olap.fact.database}: |
+ # self.test_connection(cr, uid,[ref('olap_fact_database_openerp0')], context)
+-
+ In order to test schema,I create a new schema record.
+-
+ !record {model: olap.schema, id: olap_schema_Partners0}:
+ database_id: olap_fact_database_openerp0
+ name: Partners
+-
+ I press "Connect to Database" and I see that the Schema State is "Database Connected" now
+-
+ !workflow {model: olap.schema, action: dbconnect, ref: olap_schema_Partners0}
+-
+ Now I will load the structure of the database. by structure we mean tables, columns and the relations. This will help in defining cube easily.
+-
+ !record {model: bi.load.db.wizard, id: bi_load_db_wizard_0}:
+ db_name: OpenERP
+ fact_table: Partners
+-
+ I can see two buttons for Configuration one for manually and the other is for Automatically.I press "Configure Automatically".After configuration I can see that the Boolean Configuring Data-structure is True now Schema State is "The Structure is Configured" and there is one button "Mark as Configured"
+-
+ !record {model: bi.auto.configure.wizard, id: bi_auto_configure_wizard_Partners0}:
+ name: Partners
+-
+ Performing a workflow action load on module olap.schema
+-
+ !workflow {model: olap.schema, action: dbload, ref: olap_schema_Partners0}
+-
+ Performing a workflow action configure on module olap.schema
+-
+ !workflow {model: olap.schema, action: dbconfigure, ref: olap_schema_Partners0}
+-
+ Performing a workflow action dbready on module olap.schema
+-
+ !workflow {model: olap.schema, action: dbready, ref: olap_schema_Partners0}
+-
+ In order to create Cube I first define the fact table.Fact table are the key tables in which measures are stored and we can branch to other tables for other parameters.
+-
+ !record {model: olap.database.tables, id: database_table_res_partner}:
+ active: True
+ fact_database_id: fact_database_terp
+ name: res_partner
+ table_db_name: res_partner
+-
+ I create cube table and select ID of as Relational Column.Then I select related record in Joined tables.
+-
+ !record {model: olap.cube.table, id: olap_cube_table_partnercubetable0}:
+ column_link_id: olap.columns_res_partner_id
+ name: Partner cube table
+ available_table_ids:
+ - olap.columns_res_partner_date
+ - olap.columns_res_partner_id
+ - olap.columns_res_partner_credit_limit
+ - olap.columns_res_partner_user_id
+
+-
+ I can configure Cube from BI Cube Designer.I make sure that OpenERP BI web-client is running.From Configuration I click on "Cube Designer" and It will open Cube Designer in my system browser.I can see that the schema "Partners" is visible through Cube Designer.
+-
+ Creating olap cube
+-
+ !record {model: olap.cube, id: olap_cube_partnercube0}:
+ name: Partner cube
+ query_log: true
+ schema_id: olap_schema_Partners0
+ table_id: olap_cube_table_partnercubetable0
+-
+ After cube we can decide upon the dimensions to be used for the cube.In order to analyze Partner I create one dimension.
+-
+ !record {model: olap.dimension, id: olap_dimension_products0}:
+ name: Products
+ cube_id: olap_cube_partnercube0
+-
+ After adding the dimension I create hierarchy.
+-
+ !record {model: olap.hierarchy, id: olap_hierarchy_allproducts0}:
+ dimension_id: olap_dimension_products0
+ name: All Products
+ sequence: 1
+ table_id: olap_cube_table_partnercubetable0
+-
+ After adding the hierarchy I create level.I select Product's default_code as Columns Name that is loaded in Fact columns.
+-
+ !record {model: olap.level, id: olap_level_productscode0}:
+ column_id_name: name
+ column_name: olap.columns_res_user_name
+ hierarchy_id: olap_hierarchy_allproducts0
+ name: Products code
+ sequence: 1
+ table_name: res_users
+ type: normal
+-
+ I will check that columns is loaded in Fact Table.
+-
+ !python {model: olap.load.column}: |
+ ids = self.search(cr, uid, [])
+ self.get_table_data(cr, uid, ids, {'active_ids': [ref('olap_cube_table_partnercubetable0')]})
+
diff --git a/addons/olap/wizard/olap_load_column.py b/addons/olap/wizard/olap_load_column.py
index 422a50abcff..65517626d62 100644
--- a/addons/olap/wizard/olap_load_column.py
+++ b/addons/olap/wizard/olap_load_column.py
@@ -26,7 +26,6 @@ class olap_load_column(osv.osv_memory):
_description = "Olap Load Column"
def get_table_data(self, cr, uid, ids, context={}):
-
"""
This function load column
@param cr: the current row, from the database cursor,
diff --git a/addons/survey/__openerp__.py b/addons/survey/__openerp__.py
index 367e6af5b8d..ee4099828f2 100644
--- a/addons/survey/__openerp__.py
+++ b/addons/survey/__openerp__.py
@@ -44,6 +44,9 @@
'wizard/survey_print.xml',
'wizard/survey_send_invitation.xml'],
'demo_xml': ['survey_demo.xml'],
+ 'test': [
+ 'test/survey00.yml',
+ ],
'installable': True,
'active': False,
}
diff --git a/addons/survey/test/survey00.yml b/addons/survey/test/survey00.yml
new file mode 100644
index 00000000000..7bfe8a5320d
--- /dev/null
+++ b/addons/survey/test/survey00.yml
@@ -0,0 +1,159 @@
+- |
+ Survey Scenario:
+ In order to check the survey module in OpenERP.
+-
+ I Create the one survey and give survey title "Partner Feedback" and define the survey pages and survey question.
+-
+ I Create "Partner Feedback" survey.
+-
+ !record {model: 'survey', id: survey_partner_0}:
+ title: 'Partner Feedback'
+ max_response_limit: 20
+-
+ I Create "Who are you?" page in "Partner Feedback" survey with title .
+-
+ !record {model: 'survey.page', id: survey_partner_page_0}:
+ title: 'Who are you?'
+ survey_id: survey_partner_0
+-
+ I Create "What is your company name?" question in "Who are you" survey page.
+-
+ !record {model: 'survey.question', id: survey_p_question_0}:
+ question: 'What is your company name?'
+ type: single_textbox
+ sequence: 1
+ page_id: survey_partner_page_0
+-
+ I Create "What is your company size?" question in "Who are you" survey page.
+-
+ !record {model: 'survey.question', id: survey_p_question_1}:
+ question: 'What is your company size?'
+ type: multiple_choice_only_one_ans
+ sequence: 2
+ is_require_answer: true
+ page_id: survey_partner_page_0
+-
+ I Create "1-50" answer in question "What is your company size?"
+-
+ !record {model: 'survey.answer', id: survey_p_1_1}:
+ answer: '1 - 50'
+ sequence: 1
+ question_id : survey_p_question_1
+-
+ I Create "51 - 100" answer in question "What is your company size?"
+-
+ !record {model: 'survey.answer', id: survey_p_1_2}:
+ answer: '51 - 100'
+ sequence: 2
+ question_id : survey_p_question_1
+-
+ I Create "100 - 500" answer in question "What is your company size?"
+-
+ !record {model: 'survey.answer', id: survey_p_1_3}:
+ answer: '100 - 500'
+ sequence: 3
+ question_id : survey_p_question_1
+-
+ I Create "500 - 1000" answer in question "What is your company size?"
+-
+ !record {model: 'survey.answer', id: survey_p_1_4}:
+ answer: '500 - 1000'
+ sequence: 4
+ question_id : survey_p_question_1
+-
+ I Create "> 1000" answer in question "What is your company size?"
+-
+ !record {model: 'survey.answer', id: survey_p_1_5}:
+ answer: '> 1000'
+ sequence: 5
+ question_id : survey_p_question_1
+-
+ I Create another "Contract" page in "Partner Feedback" survey.
+-
+ !record {model: 'survey.page', id: survey_partner_page_1}:
+ title: 'Contract'
+ survey_id: survey_partner_0
+-
+ I Create "Which maintenance contract do you sell to your customers." question in "Contract" survey page.
+-
+ !record {model: 'survey.question', id: survey_p_question_3}:
+ question: 'Which maintenance contract do you sell to your customers.'
+ type: multiple_choice_only_one_ans
+ sequence: 1
+ page_id: survey_partner_page_1
+-
+ I Create "OpenERP maintenance contract" answer in question "Which maintenance contract do you sell to your customers."
+-
+ !record {model: 'survey.answer', id: survey_p_3_1}:
+ answer: 'OpenERP maintenance contract'
+ sequence: 1
+ question_id : survey_p_question_3
+-
+ I Create "Your own contract, but you buy an OpenERP one" answer in question "Which maintenance contract do you sell to your customers."
+-
+ !record {model: 'survey.answer', id: survey_p_3_2}:
+ answer: 'Your own contract, but you buy an OpenERP one'
+ sequence: 2
+ question_id : survey_p_question_3
+-
+ I Create "Your own contract without buying an OpenERP one" answer in question "Which maintenance contract do you sell to your customers."
+-
+ !record {model: 'survey.answer', id: survey_p_3_3}:
+ answer: 'Your own contract without buying an OpenERP one'
+ sequence: 3
+ question_id : survey_p_question_3
+-
+ I Create "When do you propose a maintenance contract to your customers?" question in "Contract" survey page.
+-
+ !record {model: 'survey.question', id: survey_p_question_4}:
+ question: When do you propose a maintenance contract to your customers?
+ type: multiple_choice_only_one_ans
+ sequence: 2
+ comment_field_type: text
+ comment_label: Why?
+ is_require_answer: true
+ is_comment_require: true
+ page_id: survey_partner_page_1
+-
+ I Create "With each integration" answer in question "When do you propose a maintenance contract to your customers?"
+-
+ !record {model: 'survey.answer', id: survey_p_4_1}:
+ answer: 'With each integration'
+ sequence: 1
+ question_id : survey_p_question_4
+-
+ I Create "Sometimes" answer in question "When do you propose a maintenance contract to your customers?"
+-
+ !record {model: 'survey.answer', id: survey_p_4_2}:
+ answer: 'Sometimes'
+ sequence: 2
+ question_id : survey_p_question_4
+-
+ I Create "Never... " answer in question "When do you propose a maintenance contract to your customers?"
+-
+ !record {model: 'survey.answer', id: survey_p_4_3}:
+ answer: 'Never... '
+ sequence: 3
+ question_id : survey_p_question_4
+-
+ Now Survey set in open state.
+-
+ !python {model: survey}: |
+ self.survey_open(cr, uid, [ref("survey_partner_0")], context)
+-
+ Give answer of the survey, Run "Answer a Survey" wizard and select the survey and press on start button then run the selected survey.
+-
+ !python {model: survey.name.wiz}: |
+ ids = self.create(cr, uid, {'survey_id': ref("survey_partner_0")})
+ self.action_next(cr, uid, [ids], context)
+-
+ Give answer of the first and second page in "Partner Feedback" suvey.
+-
+ !python {model: survey.question.wiz}: |
+ ids = self.create(cr, uid, {str(ref("survey_p_question_0")) +"_single" :'Tiny' , str(ref("survey_p_question_1")) + "_selection" :int(ref("survey_p_1_1"))}, context)
+ ids = self.create(cr, uid, {str(ref("survey_p_question_3")) +"_selection" : int(ref("survey_p_3_1")), str(ref("survey_p_question_4")) +"_selection": int(ref("survey_p_4_1"))},context)
+-
+ Set the value in "Total start survey" field.
+-
+ !python {model: survey}: |
+ ids = self.write(cr, uid, ref("survey_partner_0"), {'tot_start_survey' : 1}, context)
diff --git a/addons/wiki/__openerp__.py b/addons/wiki/__openerp__.py
index 033060ad1a7..65a4212c289 100644
--- a/addons/wiki/__openerp__.py
+++ b/addons/wiki/__openerp__.py
@@ -42,7 +42,8 @@
'data/wiki_main.xml',
'security/ir.model.access.csv'
],
- 'demo_xml': [],
+ 'demo_xml': ['test/wiki_test00.yml'],
+ # 'demo_xml': [],
'installable': True,
'active': False,
'certificate': '0086363630317',
diff --git a/addons/wiki/test/wiki_test00.yml b/addons/wiki/test/wiki_test00.yml
new file mode 100755
index 00000000000..cdaa28c1829
--- /dev/null
+++ b/addons/wiki/test/wiki_test00.yml
@@ -0,0 +1,72 @@
+-
+ In order to test the wiki in OpenERP, I create a new wiki group on Select Display Method Tree
+-
+ !record {model: wiki.groups, id: wiki_groups_wikigrouptest0}:
+ method: tree
+ name: Wiki Group Test
+ notes: I can Generate New Group for Select Display method = Tree.
+-
+ Now I will create new wikipage and assign Group test to this page
+-
+ !record {model: wiki.wiki, id: wiki_wiki_openerpwikiediting0}:
+ group_id: wiki.wiki_groups_wikigrouptest0
+ name: OpenERP Wiki Test
+ section: '1.1'
+ text_area: '=The Open ERP wiki=
+
+ The Open ERP wiki allows you to manage your enterprise contents using wiki
+
+ restructured texts. This module provides a collaborative way to manage internal
+
+ FAQs, quality manuals, technical references, etc.
+
+ '
+-
+ I Get Help on this current page by clicking on "Basic wiki Editing" wizard
+-
+ !python {model: wiki.wiki}: |
+ self.open_wiki_page(cr, uid, [ref("wiki_wiki_openerpwikiediting0")], context)
+-
+ I create Index on this current page by clicking on "Create Index" wizard
+-
+ !python {model: wiki.make.index}: |
+ ids = self.search(cr, uid, [])
+ self.wiki_do_index(cr, uid, ids , {'active_ids': [ref('wiki_wiki_openerpwikiediting0')]})
+-
+ # Remaining Act window
+ I check the page history for the current page by clicking on "Page History".After that find difference between history.
+-
+ I create a new wiki group on the Given Home Page
+-
+ !record {model: wiki.groups, id: wiki_groups_wikigroupediting0}:
+ name: Wiki Group Editing
+ home: wiki.wiki_wiki_quickstart0
+-
+ I open a wiki page on this given group and page by clicking on Open wiki Page wizard.
+-
+ !python {model: wiki.wiki.page.open}: |
+ ids = self.search(cr, uid, [])
+ self.open_wiki_page(cr, uid, ids, {'active_ids': [ref('wiki_groups_wikigroupediting0')]})
+-
+ # Remaining beacuse of Act window (I search the page by clicking on the "search page".)
+ In order to create a menu I will create wizard data
+-
+ !record {model: wiki.groups, id: wiki.wiki_groups_wikiformatting0}:
+ home: wiki.wiki_wiki_main
+-
+ I create a Menu by clicking on "create menu" button.
+ # The folowing is not running properly because of osv memory problem
+-
+ !record {model: wiki.create.menu, id: wiki_create_menu_0}:
+ menu_name: Wiki Test menu
+ menu_parent_id: base.menu_base_partner
+ page: wiki.wiki_wiki_openerpwikiediting0
+-
+ #I will check that menu is generated properly
+-
+ # Remaining because some problem occur
+ #!python {model: wiki.create.menu}: |
+ # ids = self.search(cr, uid, [])
+ # self.wiki_menu_create(cr, uid, ids, context)
+
+