[REF] Rename model crm.meeting into calendar.event

Remove 2 unsused field from calendar.event model (dir,sequence)

bzr revid: jke@openerp.com-20140115093805-1g1j1oymyxsb6kgh
This commit is contained in:
jke-openerp 2014-01-15 10:38:05 +01:00
parent 0848bc7c79
commit 46b0c7aa00
35 changed files with 210 additions and 214 deletions

View File

@ -103,14 +103,13 @@ class calendar_attendee(osv.Model):
_columns = {
'state': fields.selection([('needsAction', 'Needs Action'), ('tentative', 'Uncertain'), ('declined', 'Declined'), ('accepted', 'Accepted')], 'Status', readonly=True, help="Status of the attendee's participation"),
'cn': fields.function(_compute_data, string='Common name', type="char", multi='cn', store=True),
'dir': fields.char('URI Reference', help="Reference to the URI that points to the directory information corresponding to the attendee."),
'partner_id': fields.many2one('res.partner', 'Contact', readonly="True"),
'email': fields.char('Email', help="Email of Invited Person"),
'event_date': fields.function(_compute_data, string='Event Date', type="datetime", multi='event_date'),
'event_end_date': fields.function(_compute_data, string='Event End Date', type="datetime", multi='event_end_date'),
'availability': fields.selection([('free', 'Free'), ('busy', 'Busy')], 'Free/Busy', readonly="True"),
'access_token': fields.char('Invitation Token'),
'event_id': fields.many2one('crm.meeting', 'Meeting linked'),
'event_id': fields.many2one('calendar.event', 'Meeting linked'),
}
_defaults = {
'state': 'needsAction',
@ -207,7 +206,7 @@ class calendar_attendee(osv.Model):
ids = [ids]
dummy, template_id = data_pool.get_object_reference(cr, uid, 'calendar', template_xmlid)
dummy, act_id = data_pool.get_object_reference(cr, uid, 'calendar', "view_crm_meeting_calendar")
dummy, act_id = data_pool.get_object_reference(cr, uid, 'calendar', "view_calendar_event_calendar")
local_context.update({
'color': color,
'action_id': self.pool['ir.actions.act_window'].search(cr, uid, [('view_id', '=', act_id)], context=context)[0],
@ -262,7 +261,7 @@ class calendar_attendee(osv.Model):
"""
if context is None:
context = {}
meeting_obj = self.pool['crm.meeting']
meeting_obj = self.pool['calendar.event']
res = self.write(cr, uid, ids, {'state': 'accepted'}, context)
for attendee in self.browse(cr, uid, ids, context=context):
meeting_obj.message_post(cr, uid, attendee.event_id.id, body=_(("%s has accepted invitation") % (attendee.cn)), subtype="calendar.subtype_invitation", context=context)
@ -276,7 +275,7 @@ class calendar_attendee(osv.Model):
"""
if context is None:
context = {}
meeting_obj = self.pool['crm.meeting']
meeting_obj = self.pool['calendar.event']
res = self.write(cr, uid, ids, {'state': 'declined'}, context)
for attendee in self.browse(cr, uid, ids, context=context):
meeting_obj.message_post(cr, uid, attendee.event_id.id, body=_(("%s has declined invitation") % (attendee.cn)), subtype="calendar.subtype_invitation", context=context)
@ -304,7 +303,7 @@ class res_partner(osv.Model):
datas = []
meeting = False
if meeting_id:
meeting = self.pool['crm.meeting'].browse(cr, uid, get_real_ids(meeting_id), context=context)
meeting = self.pool['calendar.event'].browse(cr, uid, get_real_ids(meeting_id), context=context)
for partner in self.browse(cr, uid, ids, context=context):
data = self.name_get(cr, uid, [partner.id], context)[0]
if meeting:
@ -342,21 +341,21 @@ class calendar_alarm_manager(osv.AbstractModel):
calcul_delta.max_delta,
crm.rrule AS rule
FROM
crm_meeting AS crm
calendar_event AS crm
RIGHT JOIN
(
SELECT
rel.crm_meeting_id, max(alarm.duration_minutes) AS max_delta,min(alarm.duration_minutes) AS min_delta
rel.calendar_event_id, max(alarm.duration_minutes) AS max_delta,min(alarm.duration_minutes) AS min_delta
FROM
calendar_alarm_crm_meeting_rel AS rel
calendar_alarm_calendar_event_rel AS rel
LEFT JOIN calendar_alarm AS alarm ON alarm.id = rel.calendar_alarm_id
WHERE alarm.type in %s
GROUP BY rel.crm_meeting_id
) AS calcul_delta ON calcul_delta.crm_meeting_id = crm.id
GROUP BY rel.calendar_event_id
) AS calcul_delta ON calcul_delta.calendar_event_id = crm.id
"""
filter_user = """
LEFT JOIN crm_meeting_res_partner_rel AS part_rel ON part_rel.crm_meeting_id = crm.id
LEFT JOIN calendar_event_res_partner_rel AS part_rel ON part_rel.calendar_event_id = crm.id
AND part_rel.res_partner_id = %s
"""
@ -452,11 +451,11 @@ class calendar_alarm_manager(osv.AbstractModel):
for event in all_events: #.values()
max_delta = all_events[event]['max_duration'];
curEvent = self.pool.get('crm.meeting').browse(cr,uid,event,context=context)
curEvent = self.pool.get('calendar.event').browse(cr,uid,event,context=context)
if curEvent.recurrency:
bFound = False
LastFound = False
for one_date in self.pool.get('crm.meeting').get_recurrent_date_by_event(cr,uid,curEvent, context=context) :
for one_date in self.pool.get('calendar.event').get_recurrent_date_by_event(cr,uid,curEvent, context=context) :
in_date_format = datetime.strptime(one_date, '%Y-%m-%d %H:%M:%S');
LastFound = self.do_check_alarm_for_one_date(cr,uid,in_date_format,curEvent,max_delta,cron_interval,notif=False,context=context)
if LastFound:
@ -472,7 +471,7 @@ class calendar_alarm_manager(osv.AbstractModel):
LastFound = self.do_check_alarm_for_one_date(cr,uid,in_date_format,curEvent,max_delta,cron_interval,notif=False,context=context)
if LastFound:
for alert in LastFound:
self.do_mail_reminder(cr,uid,alert,context=context)
self.do_mail_reminder(cr,uid,alert,context=context)
def get_next_notif(self,cr,uid,context=None):
ajax_check_every_seconds = 300
@ -482,11 +481,11 @@ class calendar_alarm_manager(osv.AbstractModel):
for event in all_events: # .values()
max_delta = all_events[event]['max_duration'];
curEvent = self.pool.get('crm.meeting').browse(cr,uid,event,context=context)
curEvent = self.pool.get('calendar.event').browse(cr,uid,event,context=context)
if curEvent.recurrency:
bFound = False
LastFound = False
for one_date in self.pool.get("crm.meeting").get_recurrent_date_by_event(cr,uid,curEvent, context=context) :
for one_date in self.pool.get("calendar.event").get_recurrent_date_by_event(cr,uid,curEvent, context=context) :
in_date_format = datetime.strptime(one_date, '%Y-%m-%d %H:%M:%S');
LastFound = self.do_check_alarm_for_one_date(cr,uid,in_date_format,curEvent,max_delta,ajax_check_every_seconds,after=partner.cal_last_notif,mail=False,context=context)
if LastFound:
@ -509,17 +508,17 @@ class calendar_alarm_manager(osv.AbstractModel):
context = {}
res = False
event = self.pool['crm.meeting'].browse(cr, uid, alert['event_id'], context=context)
event = self.pool['calendar.event'].browse(cr, uid, alert['event_id'], context=context)
alarm = self.pool['calendar.alarm'].browse(cr, uid, alert['alarm_id'], context=context)
if alarm.type == 'email':
res = self.pool['calendar.attendee']._send_mail_to_attendees(cr, uid, event.attendee_ids, template_xmlid='calendar_template_meeting_reminder', context=context)
return res
def do_notif_reminder(self, cr, uid, alert, context=None):
alarm = self.pool['calendar.alarm'].browse(cr, uid, alert['alarm_id'], context=context)
event = self.pool['crm.meeting'].browse(cr, uid, alert['event_id'], context=context)
event = self.pool['calendar.event'].browse(cr, uid, alert['event_id'], context=context)
if alarm.type == 'notification':
message = event.display_time
@ -630,17 +629,17 @@ def exp_report(db, uid, object, ids, data=None, context=None):
openerp.service.report.exp_report = exp_report
class crm_meeting_type(osv.Model):
_name = 'crm.meeting.type'
class calendar_event_type(osv.Model):
_name = 'calendar.event.type'
_description = 'Meeting Type'
_columns = {
'name': fields.char('Name', required=True, translate=True),
}
class crm_meeting(osv.Model):
""" Model for CRM meetings """
_name = 'crm.meeting'
class calendar_event(osv.Model):
""" Model for Calendar Event """
_name = 'calendar.event'
_description = "Meeting"
_order = "id desc"
_inherit = ["mail.thread", "ir.needaction_mixin"]
@ -802,7 +801,6 @@ class crm_meeting(osv.Model):
'is_attendee': fields.function(_compute, string='Attendee', type="boolean", multi='attendee'),
'attendee_status': fields.function(_compute, string='Attendee Status', type="selection", multi='attendee'),
'display_time': fields.function(_compute, string='Event Time', type="char", multi='attendee'),
'sequence': fields.integer('Sequence'),
'date': fields.datetime('Date', states={'done': [('readonly', True)]}, required=True, track_visibility='onchange'),
'date_deadline': fields.datetime('End Date', states={'done': [('readonly', True)]}, required=True,),
'duration': fields.float('Duration', states={'done': [('readonly', True)]}),
@ -835,7 +833,7 @@ class crm_meeting(osv.Model):
'user_id': fields.many2one('res.users', 'Responsible', states={'done': [('readonly', True)]}),
'color_partner_id': fields.related('user_id', 'partner_id', 'id', type="int", string="colorize", store=False), # Color of creator
'active': fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the event alarm information without removing it."),
'categ_ids': fields.many2many('crm.meeting.type', 'meeting_category_rel', 'event_id', 'type_id', 'Tags'),
'categ_ids': fields.many2many('calendar.event.type', 'meeting_category_rel', 'event_id', 'type_id', 'Tags'),
'attendee_ids': fields.one2many('calendar.attendee', 'event_id', 'Attendees', ondelete='cascade'),
'partner_ids': fields.many2many('res.partner', string='Attendees', states={'done': [('readonly', True)]}),
'alarm_ids': fields.many2many('calendar.alarm', string='Reminders', ondelete="restrict"),
@ -913,7 +911,7 @@ class crm_meeting(osv.Model):
return {'value': value}
def new_invitation_token(self, cr, uid, record, partner_id):
def new_invitation_token(self, cr, uid, record, partner_id):
return uuid.uuid4().hex
def create_attendees(self, cr, uid, ids, context):
@ -996,10 +994,10 @@ class crm_meeting(osv.Model):
@param order: The fields (comma separated, format "FIELD {DESC|ASC}") on which the events should be sorted
"""
if not context:
context = {}
if isinstance(event_id, (str, int, long)):
ids_to_browse = [event_id] # keep select for return
else:
@ -1010,7 +1008,7 @@ class crm_meeting(osv.Model):
else:
# fallback on self._order defined on the model
order_fields = [field.split()[0] for field in self._order.split(',')]
if 'id' not in order_fields:
order_fields.append('id')
@ -1197,7 +1195,7 @@ class crm_meeting(osv.Model):
res = {}
for virtual_id in ids:
real_id = calendar_id2real_id(virtual_id)
result = super(crm_meeting, self).message_get_subscription_data(cr, uid, [real_id], user_pid=None, context=context)
result = super(calendar_event, self).message_get_subscription_data(cr, uid, [real_id], user_pid=None, context=context)
res[virtual_id] = result[real_id]
return res
@ -1267,7 +1265,7 @@ class crm_meeting(osv.Model):
thread_id = get_real_ids(thread_id)
if context.get('default_date'):
del context['default_date']
return super(crm_meeting, self).message_post(cr, uid, thread_id, body=body, subject=subject, type=type, subtype=subtype, parent_id=parent_id, attachments=attachments, context=context, **kwargs)
return super(calendar_event, self).message_post(cr, uid, thread_id, body=body, subject=subject, type=type, subtype=subtype, parent_id=parent_id, attachments=attachments, context=context, **kwargs)
def do_sendmail(self, cr, uid, ids, context=None):
for event in self.browse(cr, uid, ids, context):
@ -1281,20 +1279,20 @@ class crm_meeting(osv.Model):
def get_attendee(self, cr, uid, meeting_id, context=None):
# Used for view in controller
invitation = {'meeting': {}, 'attendee': []}
meeting = self.browse(cr, uid, int(meeting_id), context)
invitation['meeting'] = {
'event': meeting.name,
'where': meeting.location,
'when': meeting.display_time
}
for attendee in meeting.attendee_ids:
invitation['attendee'].append({'name': attendee.cn, 'status': attendee.state})
return invitation
def get_interval(self, cr, uid, ids, date, interval, context=None):
#Function used only in crm_meeting_data.xml for email template
#Function used only in calendar_event_data.xml for email template
date = datetime.strptime(date.split('.')[0], DEFAULT_SERVER_DATETIME_FORMAT)
if interval == 'day':
res = str(date.day)
@ -1328,10 +1326,10 @@ class crm_meeting(osv.Model):
#offset, limit and count must be treated separately as we may need to deal with virtual ids
if context.get('virtual_id', True):
res = super(crm_meeting, self).search(cr, uid, new_args, offset=0, limit=0, order=None, context=context, count=False)
res = super(calendar_event, self).search(cr, uid, new_args, offset=0, limit=0, order=None, context=context, count=False)
res = self.get_recurrent_ids(cr, uid, res, args, order=order, context=context)
else:
res = super(crm_meeting, self).search(cr, uid, new_args, offset=0, limit=0, order=order, context=context, count=False)
res = super(calendar_event, self).search(cr, uid, new_args, offset=0, limit=0, order=order, context=context, count=False)
if count:
return len(res)
elif limit:
@ -1345,7 +1343,7 @@ class crm_meeting(osv.Model):
default = default or {}
default['attendee_ids'] = False
res = super(crm_meeting, self).copy(cr, uid, calendar_id2real_id(id), default, context)
res = super(calendar_event, self).copy(cr, uid, calendar_id2real_id(id), default, context)
return res
def write(self, cr, uid, ids, values, context=None):
@ -1357,15 +1355,13 @@ class crm_meeting(osv.Model):
return True
context = context or {}
if isinstance(ids, (str)):
if isinstance(ids, (str,int, long)):
if len(str(ids).split('-')) == 1:
ids = [int(ids)]
else:
ids = [ids]
if isinstance(ids, (int, long)):
ids = [ids]
res = False
new_id = False
@ -1405,14 +1401,14 @@ class crm_meeting(osv.Model):
context.update({'active_id': new_id, 'active_ids': [new_id]})
continue
res = super(crm_meeting, self).write(cr, uid, ids, values, context=context)
res = super(calendar_event, self).write(cr, uid, ids, values, context=context)
# set end_date for calendar searching
if values.get('recurrency', True) and values.get('end_type', 'count') in ('count', unicode('count')) and \
(values.get('rrule_type') or values.get('count') or values.get('date') or values.get('date_deadline')):
for data in self.read(cr, uid, ids, ['date', 'date_deadline', 'recurrency', 'rrule_type', 'count', 'end_type'], context=context):
end_date = self._get_recurrency_end_date(data, context=context)
super(crm_meeting, self).write(cr, uid, [data['id']], {'end_date': end_date}, context=context)
super(calendar_event, self).write(cr, uid, [data['id']], {'end_date': end_date}, context=context)
attendees_create = False
if values.get('partner_ids', False):
@ -1445,7 +1441,7 @@ class crm_meeting(osv.Model):
(vals.get('rrule_type') or vals.get('count') or vals.get('date') or vals.get('date_deadline')):
vals['end_date'] = self._get_recurrency_end_date(vals, context=context)
res = super(crm_meeting, self).create(cr, uid, vals, context=context)
res = super(calendar_event, self).create(cr, uid, vals, context=context)
self.create_attendees(cr, uid, [res], context=context)
return res
@ -1457,7 +1453,7 @@ class crm_meeting(osv.Model):
raise osv.except_osv(_('Warning!'), _('Group by date is not supported, use the calendar view instead.'))
virtual_id = context.get('virtual_id', True)
context.update({'virtual_id': False})
res = super(crm_meeting, self).read_group(cr, uid, domain, fields, groupby, offset=offset, limit=limit, context=context, orderby=orderby)
res = super(calendar_event, self).read_group(cr, uid, domain, fields, groupby, offset=offset, limit=limit, context=context, orderby=orderby)
for result in res:
#remove the count, since the value is not consistent with the result of the search when expand the group
for groupname in groupby:
@ -1484,7 +1480,7 @@ class crm_meeting(osv.Model):
select = map(lambda x: (x, calendar_id2real_id(x)), select)
result = []
real_data = super(crm_meeting, self).read(cr, uid, [real_id for calendar_id, real_id in select], fields=fields2, context=context, load=load)
real_data = super(calendar_event, self).read(cr, uid, [real_id for calendar_id, real_id in select], fields=fields2, context=context, load=load)
real_data = dict(zip([x['id'] for x in real_data], real_data))
for calendar_id, real_id in select:
@ -1538,7 +1534,7 @@ class crm_meeting(osv.Model):
ids_to_exclure.append(event_id)
if ids_to_unlink:
res = super(crm_meeting, self).unlink(cr, uid, ids_to_unlink, context=context)
res = super(calendar_event, self).unlink(cr, uid, ids_to_unlink, context=context)
if ids_to_exclure:
for id_to_exclure in ids_to_exclure:
@ -1560,7 +1556,7 @@ class mail_message(osv.Model):
return super(mail_message, self).search(cr, uid, args, offset=offset, limit=limit, order=order, context=context, count=count)
def _find_allowed_model_wise(self, cr, uid, doc_model, doc_dict, context=None):
if doc_model == 'crm.meeting':
if doc_model == 'calendar.event':
order = context.get('order', self._order)
for virtual_id in self.pool[doc_model].get_recurrent_ids(cr, uid, doc_dict.keys(), [], order=order, context=context):
doc_dict.setdefault(virtual_id, doc_dict[get_real_ids(virtual_id)])
@ -1586,15 +1582,15 @@ class ir_attachment(osv.Model):
if isinstance(vals.get('res_id'), str):
vals['res_id'] = get_real_ids(vals.get('res_id'))
return super(ir_attachment, self).write(cr, uid, ids, vals, context=context)
class ir_http(osv.AbstractModel):
_inherit = 'ir.http'
def _auth_method_calendar(self):
token = request.params['token']
token = request.params['token']
db = request.params['db']
registry = openerp.modules.registry.RegistryManager.get(db)
attendee_pool = registry.get('calendar.attendee')
error_message = False
@ -1608,11 +1604,11 @@ class ir_http(osv.AbstractModel):
user = registry.get('res.users').browse(cr, openerp.SUPERUSER_ID, request.session.uid)
if attendee.partner_id.id != user.partner_id.id:
error_message = """Invitation cannot be forwarded via email. This event/meeting belongs to %s and you are logged in as %s. Please ask organizer to add you.""" % (attendee.email, user.email)
if error_message:
raise BadRequest(error_message)
return True
class invite_wizard(osv.osv_memory):
_inherit = 'mail.wizard.invite'

View File

@ -5,7 +5,7 @@
<!-- Expense-related subtypes for messaging / Chatter -->
<record id="calendar.subtype_invitation" model="mail.message.subtype">
<field name="name">Invitation</field>
<field name="res_model">crm.meeting</field>
<field name="res_model">calendar.event</field>
<field name="description">Warning, a mandatory field has been modified since the creation of this event</field>
<field name="default" eval="False"/>
</record>
@ -87,23 +87,23 @@
<!--<field eval="'(False,)'" name="args" />-->
</record>
<record model="crm.meeting.type" id="categ_meet1">
<record model="calendar.event.type" id="categ_meet1">
<field name="name">Customer Meeting</field>
</record>
<record model="crm.meeting.type" id="categ_meet2">
<record model="calendar.event.type" id="categ_meet2">
<field name="name">Internal Meeting</field>
</record>
<record model="crm.meeting.type" id="categ_meet3">
<record model="calendar.event.type" id="categ_meet3">
<field name="name">Off-site Meeting</field>
</record>
<record model="crm.meeting.type" id="categ_meet4">
<record model="calendar.event.type" id="categ_meet4">
<field name="name">Open Discussion</field>
</record>
<record model="crm.meeting.type" id="categ_meet5">
<record model="calendar.event.type" id="categ_meet5">
<field name="name">Feedback Meeting</field>
</record>

View File

@ -30,7 +30,7 @@
<field name="partner_id" ref="base.partner_demo"/>
</record>
<record id="crm_meeting_1" model="crm.meeting">
<record id="calendar_event_1" model="calendar.event">
<field eval="1" name="active"/>
<field name="user_id" ref="base.user_root"/>
<field name="partner_ids" eval="[(6,0,[ref('base.partner_root'),ref('base.res_partner_1'),ref('base.res_partner_6')])]"/>
@ -43,7 +43,7 @@
<field name="state">open</field>
</record>
<record id="crm_meeting_2" model="crm.meeting">
<record id="calendar_event_2" model="calendar.event">
<field eval="1" name="active"/>
<field name="user_id" ref="base.user_demo"/>
<field name="partner_ids" eval="[(6,0,[ref('base.partner_root'),ref('base.res_partner_4'),ref('base.res_partner_5')])]"/>
@ -56,7 +56,7 @@
<field name="state">draft</field>
</record>
<record id="crm_meeting_3" model="crm.meeting">
<record id="calendar_event_3" model="calendar.event">
<field eval="1" name="active"/>
<field name="partner_ids" eval="[(6,0,[ref('base.partner_root')])]"/>
<field name="name">Pricing Discussion</field>
@ -68,7 +68,7 @@
<field name="state">open</field>
</record>
<record id="crm_meeting_4" model="crm.meeting">
<record id="calendar_event_4" model="calendar.event">
<field eval="1" name="active"/>
<field name="user_id" ref="base.user_demo"/>
<field name="partner_ids" eval="[(6,0,[ref('base.partner_demo'),ref('base.res_partner_6')])]"/>
@ -80,7 +80,7 @@
<field name="state">open</field>
</record>
<record id="crm_meeting_5" model="crm.meeting">
<record id="calendar_event_5" model="calendar.event">
<field eval="1" name="active"/>
<field name="partner_ids" eval="[(6,0,[ref('base.partner_root'),ref('base.res_partner_8')])]"/>
<field name="name">Changes in Designing</field>
@ -91,7 +91,7 @@
<field name="state">open</field>
</record>
<record id="crm_meeting_6" model="crm.meeting">
<record id="calendar_event_6" model="calendar.event">
<field eval="1" name="active"/>
<field name="user_id" ref="base.user_demo"/>
<field name="partner_ids" eval="[(6,0,[ref('base.partner_root'),ref('base.res_partner_1'),ref('base.res_partner_4'),ref('base.res_partner_6'),ref('base.res_partner_8')])]"/>
@ -103,7 +103,7 @@
<field name="state">draft</field>
</record>
<record id="crm_meeting_7" model="crm.meeting">
<record id="calendar_event_7" model="calendar.event">
<field eval="1" name="active"/>
<field name="user_id" ref="res_user_another"/>
<field name="partner_ids" eval="[(6,0,[ref('res_partner_another'),ref('base.res_partner_8')])]"/>
@ -115,7 +115,7 @@
<field name="state">draft</field>
</record>
<record id="crm_meeting_8" model="crm.meeting">
<record id="calendar_event_8" model="calendar.event">
<field eval="1" name="active"/>
<field name="user_id" ref="res_user_another"/>
<field name="partner_ids" eval="[(6,0,[ref('res_partner_another'),ref('base.partner_root')])]"/>

View File

@ -3,11 +3,11 @@
<data>
<!-- CRM Meetings Types Form View -->
<!-- Calendar Events Types Form View -->
<record id="view_crm_meeting_type_tree" model="ir.ui.view">
<record id="view_calendar_event_type_tree" model="ir.ui.view">
<field name="name">Meeting Types Tree</field>
<field name="model">crm.meeting.type</field>
<field name="model">calendar.event.type</field>
<field name="arch" type="xml">
<tree string="Meeting Types" editable="bottom">
<field name="name"/>
@ -15,18 +15,18 @@
</field>
</record>
<record id="action_crm_meeting_type" model="ir.actions.act_window">
<record id="action_calendar_event_type" model="ir.actions.act_window">
<field name="name">Meeting Types</field>
<field name="res_model">crm.meeting.type</field>
<field name="res_model">calendar.event.type</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_crm_meeting_type_tree"/>
<field name="view_id" ref="view_calendar_event_type_tree"/>
</record>
<!-- CRM Meetings Form View -->
<!-- Calendar Events Form View -->
<record model="ir.ui.view" id="view_crm_meeting_form">
<field name="name">CRM - Meetings Form</field>
<field name="model">crm.meeting</field>
<record model="ir.ui.view" id="view_calendar_event_form">
<field name="name">Calendar - Event Form</field>
<field name="model">calendar.event</field>
<field name="priority" eval="1"/>
<field name="arch" type="xml">
<form string="Meetings" version="7.0">
@ -160,9 +160,9 @@
</field>
</record>
<record model="ir.ui.view" id="view_crm_meeting_form_popup">
<record model="ir.ui.view" id="view_calendar_event_form_popup">
<field name="name">Meetings Popup</field>
<field name="model">crm.meeting</field>
<field name="model">calendar.event</field>
<field name="priority" eval="2"/>
<field name="arch" type="xml">
<form string="Meetings" version="7.0">
@ -190,9 +190,9 @@
<!-- CRM Meeting Tree View -->
<record model="ir.ui.view" id="view_crm_meeting_tree">
<record model="ir.ui.view" id="view_calendar_event_tree">
<field name="name">CRM - Meetings Tree</field>
<field name="model">crm.meeting</field>
<field name="model">calendar.event</field>
<field name="arch" type="xml">
<tree string="Meetings" fonts="bold:message_unread==True">
<field name="name" string="Subject"/>
@ -209,14 +209,14 @@
</record>
<!-- CRM Meeting Calendar -->
<record model="ir.ui.view" id="view_crm_meeting_calendar">
<record model="ir.ui.view" id="view_calendar_event_calendar">
<field name="name">Meetings Calendar</field>
<field name="model">crm.meeting</field>
<field name="model">calendar.event</field>
<field name="priority" eval="2"/>
<field name="arch" type="xml">
<calendar string="Meetings" date_start="date" date_stop="date_deadline" date_delay="duration" all_day="allday"
display="[name]" color="color_partner_id" attendee="partner_ids" avatar_model="res.partner"
use_contacts="True" event_open_popup="%(calendar.view_crm_meeting_form_popup)s">
use_contacts="True" event_open_popup="%(calendar.view_calendar_event_form_popup)s">
<field name="name"/>
<field name="user_id"/>
@ -228,18 +228,18 @@
<!-- CRM Meeting Gantt -->
<record id="view_crm_meeting_gantt" model="ir.ui.view">
<record id="view_calendar_event_gantt" model="ir.ui.view">
<field name="name">CRM - Meetings Gantt</field>
<field name="model">crm.meeting</field>
<field name="model">calendar.event</field>
<field name="arch" type="xml">
<gantt date_delay="duration" date_start="date" string="Meetings"/>
</field>
</record>
<!-- CRM Meeting Search View -->
<record id="view_crm_meeting_search" model="ir.ui.view">
<record id="view_calendar_event_search" model="ir.ui.view">
<field name="name">CRM - Meetings Search</field>
<field name="model">crm.meeting</field>
<field name="model">calendar.event</field>
<field name="arch" type="xml">
<search string="Search Meetings">
<field name="name" string="Meeting" filter_domain="[('name','ilike',self)]"/>
@ -262,12 +262,12 @@
</field>
</record>
<record id="action_crm_meeting" model="ir.actions.act_window">
<record id="action_calendar_event" model="ir.actions.act_window">
<field name="name">Meetings</field>
<field name="res_model">crm.meeting</field>
<field name="res_model">calendar.event</field>
<field name="view_mode">calendar,tree,form,gantt</field>
<field name="view_id" ref="view_crm_meeting_calendar"/>
<field name="search_view_id" ref="view_crm_meeting_search"/>
<field name="view_id" ref="view_calendar_event_calendar"/>
<field name="search_view_id" ref="view_calendar_event_search"/>
<field name="context">{"search_default_mymeetings": 1}</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
@ -279,41 +279,41 @@
</p>
</field>
</record>
<record model="ir.actions.act_window.view" id="action_view_crm_meeting_calendar">
<field name="act_window_id" ref="action_crm_meeting"/>
<record model="ir.actions.act_window.view" id="action_view_calendar_event_calendar">
<field name="act_window_id" ref="action_calendar_event"/>
<field name="sequence" eval="1"/>
<field name="view_mode">calendar</field>
<field name="view_id" ref="view_crm_meeting_calendar"/>
<field name="view_id" ref="view_calendar_event_calendar"/>
</record>
<record model="ir.actions.act_window.view" id="action_view_crm_meeting_tree">
<field name="act_window_id" ref="action_crm_meeting"/>
<record model="ir.actions.act_window.view" id="action_view_calendar_event_tree">
<field name="act_window_id" ref="action_calendar_event"/>
<field name="sequence" eval="2"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_crm_meeting_tree"/>
<field name="view_id" ref="view_calendar_event_tree"/>
</record>
<record model="ir.actions.act_window.view" id="action_view_crm_meeting_form">
<field name="act_window_id" ref="action_crm_meeting"/>
<record model="ir.actions.act_window.view" id="action_view_calendar_event_form">
<field name="act_window_id" ref="action_calendar_event"/>
<field name="sequence" eval="3"/>
<field name="view_mode">form</field>
<field name="view_id" ref="view_crm_meeting_form"/>
<field name="view_id" ref="view_calendar_event_form"/>
</record>
<record model="ir.actions.act_window.view" id="action_view_crm_meeting_gantt">
<field name="act_window_id" ref="action_crm_meeting"/>
<record model="ir.actions.act_window.view" id="action_view_calendar_event_gantt">
<field name="act_window_id" ref="action_calendar_event"/>
<field name="sequence" eval="4"/>
<field name="view_mode">gantt</field>
<field name="view_id" ref="view_crm_meeting_gantt"/>
<field name="view_id" ref="view_calendar_event_gantt"/>
</record>
<menuitem name="Calendar" id="mail_menu_calendar" parent="mail.mail_my_stuff" sequence="10" action="action_crm_meeting"/>
<menuitem name="Calendar" id="mail_menu_calendar" parent="mail.mail_my_stuff" sequence="10" action="action_calendar_event"/>
<menuitem id="menu_calendar_configuration" name="Calendar" parent="base.menu_custom" groups="base.group_no_one"/>
<menuitem id="menu_crm_meeting_type" parent="menu_calendar_configuration" action="action_crm_meeting_type" groups="base.group_no_one"/>
<menuitem id="menu_calendar_event_type" parent="menu_calendar_configuration" action="action_calendar_event_type" groups="base.group_no_one"/>
<!-- called in js from '/js/base_calendar.js' -->
<record id="action_crm_meeting_notify" model="ir.actions.act_window">
<record id="action_calendar_event_notify" model="ir.actions.act_window">
<field name="name">Meetings</field>
<field name="res_model">crm.meeting</field>
<field name="res_model">calendar.event</field>
<field name="view_mode">form,calendar,tree,gantt</field>
<field name="view_id" ref="action_view_crm_meeting_form"/>
<field name="view_id" ref="action_view_calendar_event_form"/>
</record>

View File

@ -33,7 +33,7 @@ class meeting_invitation(http.Controller):
@http.route('/calendar/meeting/view', type='http', auth="calendar")
def view(self, db, token, action, id, view='calendar'):
registry = openerp.modules.registry.RegistryManager.get(db)
meeting_pool = registry.get('crm.meeting')
meeting_pool = registry.get('calendar.event')
attendee_pool = registry.get('calendar.attendee')
with registry.cursor() as cr:
attendee_data = meeting_pool.get_attendee(cr, openerp.SUPERUSER_ID, id);

View File

@ -2,15 +2,15 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_calendar_attendee,calendar.attendee,model_calendar_attendee,,1,1,1,1
access_calendar_alarm,calendar.alarm,model_calendar_alarm,base.group_user,1,1,1,1
access_calendar_attendee_survey_user,calendar.attendee,model_calendar_attendee,base.group_survey_user,1,0,0,0
access_crm_meeting_manager,crm.meeting.manager,model_crm_meeting,base.group_sale_manager,1,1,1,1
access_crm_meeting,crm.meeting,model_crm_meeting,base.group_sale_salesman,1,1,1,0
access_crm_meeting_all,crm.meeting_all,model_crm_meeting,base.group_user,1,1,1,1
access_crm_meeting_partner_manager,crm.meeting.partner.manager,model_crm_meeting,base.group_partner_manager,1,1,1,1
access_crm_meeting_type_all,crm.meeting.type.all,model_crm_meeting_type,,1,0,0,0
access_crm_meeting_type_sale_manager,crm.meeting.type.manager,model_crm_meeting_type,base.group_sale_manager,1,1,1,0
access_crm_meeting_type_sale_user,crm.meeting.type.user,model_crm_meeting_type,base.group_user,1,0,0,0
access_crm_meeting_type_sale_user,crm.meeting.type.salesman,model_crm_meeting_type,base.group_sale_salesman,1,0,0,0
access_crm_meeting_type_manager,crm.meeting.type.manager,model_crm_meeting_type,base.group_system,1,1,1,1
access_calendar_event_manager,calendar.event.manager,model_calendar_event,base.group_sale_manager,1,1,1,1
access_calendar_event,calendar.event,model_calendar_event,base.group_sale_salesman,1,1,1,0
access_calendar_event_all,calendar.event_all,model_calendar_event,base.group_user,1,1,1,1
access_calendar_event_partner_manager,calendar.event.partner.manager,model_calendar_event,base.group_partner_manager,1,1,1,1
access_calendar_event_type_all,calendar.event.type.all,model_calendar_event_type,,1,0,0,0
access_calendar_event_type_sale_manager,calendar.event.type.manager,model_calendar_event_type,base.group_sale_manager,1,1,1,0
access_calendar_event_type_sale_user,calendar.event.type.user,model_calendar_event_type,base.group_user,1,0,0,0
access_calendar_event_type_sale_user,calendar.event.type.salesman,model_calendar_event_type,base.group_sale_salesman,1,0,0,0
access_calendar_event_type_manager,calendar.event.type.manager,model_calendar_event_type,base.group_system,1,1,1,1
access_calendar_alarm_manager,access_calendar_alarm_manager,model_calendar_alarm_manager,,1,1,1,1
access_calendar_contacts_all,access_calendar_contacts_all,model_calendar_contacts,,1,1,1,1
access_calendar_contacts,access_calendar_contacts,model_calendar_contacts,base.group_system,1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_calendar_attendee calendar.attendee model_calendar_attendee 1 1 1 1
3 access_calendar_alarm calendar.alarm model_calendar_alarm base.group_user 1 1 1 1
4 access_calendar_attendee_survey_user calendar.attendee model_calendar_attendee base.group_survey_user 1 0 0 0
5 access_crm_meeting_manager access_calendar_event_manager crm.meeting.manager calendar.event.manager model_crm_meeting model_calendar_event base.group_sale_manager 1 1 1 1
6 access_crm_meeting access_calendar_event crm.meeting calendar.event model_crm_meeting model_calendar_event base.group_sale_salesman 1 1 1 0
7 access_crm_meeting_all access_calendar_event_all crm.meeting_all calendar.event_all model_crm_meeting model_calendar_event base.group_user 1 1 1 1
8 access_crm_meeting_partner_manager access_calendar_event_partner_manager crm.meeting.partner.manager calendar.event.partner.manager model_crm_meeting model_calendar_event base.group_partner_manager 1 1 1 1
9 access_crm_meeting_type_all access_calendar_event_type_all crm.meeting.type.all calendar.event.type.all model_crm_meeting_type model_calendar_event_type 1 0 0 0
10 access_crm_meeting_type_sale_manager access_calendar_event_type_sale_manager crm.meeting.type.manager calendar.event.type.manager model_crm_meeting_type model_calendar_event_type base.group_sale_manager 1 1 1 0
11 access_crm_meeting_type_sale_user access_calendar_event_type_sale_user crm.meeting.type.user calendar.event.type.user model_crm_meeting_type model_calendar_event_type base.group_user 1 0 0 0
12 access_crm_meeting_type_sale_user access_calendar_event_type_sale_user crm.meeting.type.salesman calendar.event.type.salesman model_crm_meeting_type model_calendar_event_type base.group_sale_salesman 1 0 0 0
13 access_crm_meeting_type_manager access_calendar_event_type_manager crm.meeting.type.manager calendar.event.type.manager model_crm_meeting_type model_calendar_event_type base.group_system 1 1 1 1
14 access_calendar_alarm_manager access_calendar_alarm_manager model_calendar_alarm_manager 1 1 1 1
15 access_calendar_contacts_all access_calendar_contacts_all model_calendar_contacts 1 1 1 1
16 access_calendar_contacts access_calendar_contacts model_calendar_contacts base.group_system 1 1 1 1

View File

@ -23,7 +23,7 @@ openerp.calendar = function(instance) {
$(".link2event").on('click', function() {
self.rpc("/web/action/load", {
action_id: "calendar.action_crm_meeting_notify",
action_id: "calendar.action_calendar_event_notify",
}).then( function(r) {
r.res_id = res.event_id;
return self.action_manager.do_action(r);
@ -88,7 +88,7 @@ openerp.calendar = function(instance) {
var self = this;
var action_url = '';
action_url = _.str.sprintf('/?db=%s#id=%s&view_type=form&model=crm.meeting', db, meeting_id);
action_url = _.str.sprintf('/?db=%s#id=%s&view_type=form&model=calendar.event', db, meeting_id);
var reload_page = function(){
return location.replace(action_url);

View File

@ -1,7 +1,7 @@
-
In Order to test calendar, I will first create One Simple Event with real data
-
!record {model: crm.meeting, id: crm_meeting_technicalpresentation0}:
!record {model: calendar.event, id: calendar_event_technicalpresentation0}:
class: private
date: '2011-04-30 16:00:00'
date_deadline: '2011-04-30 18:30:00'
@ -13,24 +13,24 @@
-
Now I will set recurrence for this event to occur monday and friday of week
-
!python {model: crm.meeting}: |
!python {model: calendar.event}: |
data = {'fr': 1, 'mo': 1, 'interval': 1, 'rrule_type': 'weekly', 'end_type': 'end_date', 'end_date': '2011-05-31 00:00:00', 'recurrency' : True}
self.write(cr, uid, [ref("crm_meeting_technicalpresentation0")], data)
self.write(cr, uid, [ref("calendar_event_technicalpresentation0")], data)
-
In order to check that recurrent events are views successfully in calendar view, I will open calendar view of events
-
!python {model: crm.meeting}: |
!python {model: calendar.event}: |
self.fields_view_get(cr, uid, False, 'calendar', context)
-
In order to check that recurrent events are views successfully in calendar view, I will search for one of the recurrent event and count the number of events
-
!python {model: crm.meeting}: |
!python {model: calendar.event}: |
ids = self.search(cr, uid, [('date', '>=', '2011-04-30 16:00:00'), ('date', '<=', '2011-05-31 00:00:00')], context={'virtual_id': True} )
assert len(ids) == 9, 'Wrong number of events found'
-
Now I move a virtual event, to see that a real event is well created and depending from the native recurrence
-
!python {model: crm.meeting}: |
!python {model: calendar.event}: |
ids = self.search(cr, uid, [('date', '>=', '2011-04-30 16:00:00'), ('date', '<=', '2011-05-31 00:00:00')], context={'virtual_id': True} )
before = self.search(cr, uid, [('date', '>=', '2011-04-30 16:00:00'), ('date', '<=', '2011-05-31 00:00:00')], context={'virtual_id': False})
self.write(cr, uid,[ids[1]], {'name':'New Name','recurrency' : True}, context={'virtual_id': True})
@ -42,7 +42,7 @@
-
Now I will make All day event and test it
-
!record {model: crm.meeting, id: crm_meeting_alldaytestevent0}:
!record {model: calendar.event, id: calendar_event_alldaytestevent0}:
allday: 1
class: confidential
date: '2011-04-30 00:00:00'
@ -62,5 +62,5 @@
-
Now I will assign this reminder to all day event
-
!python {model: crm.meeting}: |
self.write(cr, uid, [ref("crm_meeting_alldaytestevent0")], {'alarm_ids': [(6,0,[ref("res_alarm_daybeforeeventstarts0")])]})
!python {model: calendar.event}: |
self.write(cr, uid, [ref("calendar_event_alldaytestevent0")], {'alarm_ids': [(6,0,[ref("res_alarm_daybeforeeventstarts0")])]})

View File

@ -3,7 +3,7 @@
-
I create a recurrent meeting with daily recurrency and fixed amount of time.
-
!record {model: crm.meeting, id: crm_meeting_testmeeting0}:
!record {model: calendar.event, id: calendar_event_testmeeting0}:
count: 5
date: '2011-04-13 11:04:00'
date_deadline: '2011-04-13 12:04:00'
@ -17,13 +17,13 @@
-
I search for all the recurrent meetings.
-
!python {model: crm.meeting}: |
meeting_ids = self.search(cr, uid, [('id', 'in', [ref('crm_meeting_testmeeting0')]),('date','>=','2011-03-13'), ('date_deadline', '<=', '2011-05-13')], context={'virtual_id': True})
!python {model: calendar.event}: |
meeting_ids = self.search(cr, uid, [('id', 'in', [ref('calendar_event_testmeeting0')]),('date','>=','2011-03-13'), ('date_deadline', '<=', '2011-05-13')], context={'virtual_id': True})
assert len(meeting_ids) == 5, 'Recurrent daily meetings are not created !'
-
I create a weekly meeting till a particular end date.
-
!record {model: crm.meeting, id: crm_meeting_reviewcodewithprogrammer0}:
!record {model: calendar.event, id: calendar_event_reviewcodewithprogrammer0}:
date: '2011-04-18 11:47:00'
date_deadline: '2011-04-18 12:47:00'
day: 0.0
@ -43,13 +43,13 @@
-
I search for all the recurrent weekly meetings.
-
!python {model: crm.meeting}: |
meeting_ids = self.search(cr, uid, [('id', 'in', [ref('crm_meeting_reviewcodewithprogrammer0')]),('date','>=','2011-03-13'), ('date_deadline', '<=', '2011-05-13')], context={'virtual_id': True})
!python {model: calendar.event}: |
meeting_ids = self.search(cr, uid, [('id', 'in', [ref('calendar_event_reviewcodewithprogrammer0')]),('date','>=','2011-03-13'), ('date_deadline', '<=', '2011-05-13')], context={'virtual_id': True})
assert len(meeting_ids) == 10, 'Recurrent weekly meetings are not created !'
-
I want to schedule a meeting every month for Sprint review.
-
!record {model: crm.meeting, id: crm_meeting_sprintreview0}:
!record {model: calendar.event, id: calendar_event_sprintreview0}:
count: 12
date: '2011-04-01 12:01:00'
date_deadline: '2011-04-01 13:01:00'
@ -63,33 +63,33 @@
-
I search for all the recurrent monthly meetings.
-
!python {model: crm.meeting}: |
meeting_ids = self.search(cr, uid, [('id', 'in', [ref('crm_meeting_sprintreview0')]),('date','>=','2011-03-01'), ('date_deadline', '<=', '2012-05-13')], context={'virtual_id': True})
!python {model: calendar.event}: |
meeting_ids = self.search(cr, uid, [('id', 'in', [ref('calendar_event_sprintreview0')]),('date','>=','2011-03-01'), ('date_deadline', '<=', '2012-05-13')], context={'virtual_id': True})
assert len(meeting_ids) == 12, 'Recurrent monthly meetings are not created !'
-
I change name of my monthly Sprint Review meeting.
-
!python {model: crm.meeting}: |
idval = '%d-%s' % (ref('crm_meeting_sprintreview0'), '20110901130100')
!python {model: calendar.event}: |
idval = '%d-%s' % (ref('calendar_event_sprintreview0'), '20110901130100')
self.write(cr, uid, [idval], {'name': 'Sprint Review for google modules'})
-
I check whether all the records are edited or not.
-
!python {model: crm.meeting}: |
meeting_ids = self.search(cr, uid, [('id', 'in', [ref('crm_meeting_sprintreview0')]),('date','>=','2011-03-01'), ('date_deadline', '<=', '2012-05-13')], context={'virtual_id': True})
!python {model: calendar.event}: |
meeting_ids = self.search(cr, uid, [('id', 'in', [ref('calendar_event_sprintreview0')]),('date','>=','2011-03-01'), ('date_deadline', '<=', '2012-05-13')], context={'virtual_id': True})
meetings = self.browse(cr, uid, meeting_ids, context)
for meeting in meetings:
assert meeting.name == 'Sprint Review for google modules', 'Name not changed for id: %s' %meeting.id
-
I change description of my weekly meeting Review code with programmer.
-
!python {model: crm.meeting}: |
idval = '%d-%s' % (ref('crm_meeting_sprintreview0'), '20110425124700')
!python {model: calendar.event}: |
idval = '%d-%s' % (ref('calendar_event_sprintreview0'), '20110425124700')
self.write(cr, uid, [idval], {'description': 'Review code of the module: sync_google_calendar.'})
-
I check whether the record is edited perfectly or not.
-
!python {model: crm.meeting}: |
meeting_ids = self.search(cr, uid, [('recurrent_id', '=', ref('crm_meeting_sprintreview0')), ('recurrent_id_date','=','2011-04-25 12:47:00')], context)
!python {model: calendar.event}: |
meeting_ids = self.search(cr, uid, [('recurrent_id', '=', ref('calendar_event_sprintreview0')), ('recurrent_id_date','=','2011-04-25 12:47:00')], context)
assert meeting_ids, 'Meeting is not edited !'

View File

@ -22,7 +22,7 @@
import crm
import crm_segmentation
import crm_lead
import crm_meeting
import calendar_event
import crm_phonecall
import report
import wizard

View File

@ -81,7 +81,7 @@ Dashboard for CRM will include:
'crm_lead_view.xml',
'crm_lead_menu.xml',
'crm_meeting_menu.xml',
'calendar_event_menu.xml',
'crm_phonecall_view.xml',
'crm_phonecall_menu.xml',

View File

@ -24,18 +24,18 @@ import logging
_logger = logging.getLogger(__name__)
#
# crm.meeting is defined in module calendar
# calendar.event is defined in module calendar
#
class crm_meeting(osv.Model):
""" Model for CRM meetings """
_inherit = 'crm.meeting'
class calendar_event(osv.Model):
""" Model for Calendar Event """
_inherit = 'calendar.event'
_columns = {
'phonecall_id': fields.many2one ('crm.phonecall', 'Phonecall'),
'opportunity_id': fields.many2one ('crm.lead', 'Opportunity', domain="[('type', '=', 'opportunity')]"),
}
def create(self, cr, uid, vals, context=None):
res = super(crm_meeting, self).create(cr, uid, vals, context=context)
res = super(calendar_event, self).create(cr, uid, vals, context=context)
obj = self.browse(cr, uid, res, context=context)
if obj.opportunity_id:
self.pool.get('crm.lead').log_meeting(cr, uid, [obj.opportunity_id.id], obj.name, obj.date, obj.duration, context=context)

View File

@ -914,7 +914,7 @@ class crm_lead(format_address, osv.osv):
:return dict: dictionary value for created Meeting view
"""
opportunity = self.browse(cr, uid, ids[0], context)
res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid, 'calendar', 'action_crm_meeting', context)
res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid, 'calendar', 'action_calendar_event', context)
res['context'] = {
'default_opportunity_id': opportunity.id,
'default_partner_id': opportunity.partner_id and opportunity.partner_id.id or False,

View File

@ -79,9 +79,9 @@
view_type="form"/>
<act_window
id="act_crm_opportunity_crm_meeting_new"
id="act_crm_opportunity_calendar_event_new"
name="Meetings"
res_model="crm.meeting"
res_model="calendar.event"
view_mode="tree,form,calendar"
context="{'default_duration': 4.0, 'default_opportunity_id': active_id}"
view_type="form"/>

View File

@ -265,7 +265,7 @@ class crm_phonecall(osv.osv):
:return dict: dictionary value for created meeting view
"""
phonecall = self.browse(cr, uid, ids[0], context)
res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid, 'calendar', 'action_crm_meeting', context)
res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid, 'calendar', 'action_calendar_event', context)
res['context'] = {
'default_phonecall_id': phonecall.id,
'default_partner_id': phonecall.partner_id and phonecall.partner_id.id or False,

View File

@ -5,9 +5,9 @@
<!-- TO CONFIRM: This is fine -->
<!-- act_window
id="act_crm_phonecall_crm_meeting_new"
id="act_crm_phonecall_calendar_event_new"
name="Meetings"
res_model="crm.meeting"
res_model="calendar.event"
src_model="crm.phonecall"
view_mode="tree,form,calendar"
context="{'default_duration': 4.0, 'default_phonecall_id': active_id}"

View File

@ -42,7 +42,7 @@ class res_partner(osv.osv):
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
'opportunity_ids': fields.one2many('crm.lead', 'partner_id',\
'Leads and Opportunities', domain=[('probability', 'not in', ['0', '100'])]),
'meeting_ids': fields.many2many('crm.meeting', 'crm_meeting_partner_rel','partner_id', 'meeting_id',
'meeting_ids': fields.many2many('calendar.event', 'calendar_event_partner_rel','partner_id', 'meeting_id',
'Meetings'),
'phonecall_ids': fields.one2many('crm.phonecall', 'partner_id',\
'Phonecalls'),

View File

@ -3,10 +3,10 @@
<data>
<!-- open meetings related to given partner -->
<record id="crm_meeting_partner" model="ir.actions.act_window">
<record id="calendar_event_partner" model="ir.actions.act_window">
<field name="name">Meetings</field>
<field name="src_model">res.partner</field>
<field name="res_model">crm.meeting</field>
<field name="res_model">calendar.event</field>
<field name="view_mode">calendar,tree,form,gantt</field>
<field name="context">{'default_partner_ids': [active_id]}</field>
</record>
@ -71,7 +71,7 @@
<a name="%(relate_partner_opportunities)d" type="action" t-if="record.opportunity_count.value>0">
<t t-esc="record.opportunity_count.value"/> Opportunities
</a>
<a name="%(crm_meeting_partner)d" type="action" t-if="record.meeting_count.value>0">
<a name="%(calendar_event_partner)d" type="action" t-if="record.meeting_count.value>0">
<t t-esc="record.meeting_count.value"/> Meetings
</a>
</xpath>
@ -96,7 +96,7 @@
context="{'search_default_partner_id': active_id}"/>
<button class="oe_inline" type="action"
string="Meetings"
name="%(calendar.action_crm_meeting)d"
name="%(calendar.action_calendar_event)d"
context="{'search_default_partner_ids': active_id, 'default_partner_ids' : [active_id]}"/>
<button class="oe_inline" type="action" string="Calls"
name="%(crm.crm_case_categ_phone_incoming0)d"

View File

@ -71,9 +71,9 @@
<field name="groups" eval="[(4, ref('base.group_sale_salesman_all_leads'))]"/>
</record>
<record id="crm_meeting_global" model="ir.rule">
<record id="calendar_event_global" model="ir.rule">
<field name="name">Hide Private Meetings</field>
<field ref="model_crm_meeting" name="model_id"/>
<field ref="model_calendar_event" name="model_id"/>
<field eval="1" name="global"/>
<field name="domain_force">['|',('user_id','=',user.id),('show_as','=','busy')]</field>
</record>

View File

@ -107,9 +107,9 @@
-
I confirm review needs meeting.
-
!python {model: crm.meeting}: |
context.update({'active_model': 'crm.meeting'})
self.write(cr, uid, [ref('calendar.crm_meeting_4')], {'state': 'open'})
!python {model: calendar.event}: |
context.update({'active_model': 'calendar.event'})
self.write(cr, uid, [ref('calendar.calendar_event_4')], {'state': 'open'})
-
I invite a user for meeting.
-

View File

@ -48,7 +48,7 @@ class crm_phonecall2meeting(osv.osv_memory):
phonecall_id = context and context.get('active_id', False) or False
if phonecall_id:
phonecall = self.pool.get('crm.phonecall').browse(cr, uid, phonecall_id, context)
res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid, 'calendar', 'action_crm_meeting', context)
res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid, 'calendar', 'action_calendar_event', context)
res['context'] = {
'default_phonecall_id': phonecall.id,
'default_partner_id': phonecall.partner_id and phonecall.partner_id.id or False,

View File

@ -14,11 +14,11 @@ class google_calendar_controller(http.Controller):
def sync_data(self, arch, fields, model,**kw):
"""
This route/function is called when we want to synchronize openERP calendar with Google Calendar
Function return a dictionary with the status : need_config_from_admin, need_auth, need_refresh, success if not crm_meeting
Function return a dictionary with the status : need_config_from_admin, need_auth, need_refresh, success if not calendar_event
The dictionary may contains an url, to allow OpenERP Client to redirect user on this URL for authorization for example
"""
if model == 'crm.meeting':
if model == 'calendar.event':
gs_obj = request.registry['google.service']
gc_obj = request.registry['google.calendar']

View File

@ -133,7 +133,7 @@ class google_calendar(osv.AbstractModel):
return google_events_dict
def update_to_google(self, cr, uid, oe_event, google_event, context):
crm_meeting = self.pool['crm.meeting']
calendar_event = self.pool['calendar.event']
gs_pool = self.pool.get('google.service')
url = "/calendar/v3/calendars/%s/events/%s?fields=%s&access_token=%s" % ('primary', google_event['id'],'id,updated', self.get_token(cr,uid,context))
@ -145,7 +145,7 @@ class google_calendar(osv.AbstractModel):
content = gs_pool._do_request(cr, uid, url, data_json, headers, type='PATCH', context=context)
update_date = datetime.strptime(content['updated'],"%Y-%m-%dT%H:%M:%S.%fz")
crm_meeting.write(cr, uid, [oe_event.id], {'oe_update_date':update_date})
calendar_event.write(cr, uid, [oe_event.id], {'oe_update_date':update_date})
if context['curr_attendee']:
self.pool.get('calendar.attendee').write(cr,uid,[context['curr_attendee']], {'oe_synchro_date':update_date},context)
@ -183,7 +183,7 @@ class google_calendar(osv.AbstractModel):
if context is None:
context= []
crm_meeting = self.pool['crm.meeting']
calendar_event = self.pool['calendar.event']
res_partner_obj = self.pool['res.partner']
calendar_attendee_obj = self.pool['calendar.attendee']
user_obj = self.pool.get('res.users')
@ -252,13 +252,13 @@ class google_calendar(osv.AbstractModel):
result['rrule']=rrule
if type == "write":
res = crm_meeting.write(cr, uid, event['id'], result, context=context)
res = calendar_event.write(cr, uid, event['id'], result, context=context)
elif type == "copy":
result['recurrence'] = True
res = crm_meeting.write(cr, uid, [event['id']], result, context=context)
res = calendar_event.write(cr, uid, [event['id']], result, context=context)
elif type == "create":
res = crm_meeting.create(cr, uid, result, context=context)
res = calendar_event.create(cr, uid, result, context=context)
if context['curr_attendee']:
self.pool.get('calendar.attendee').write(cr,uid,[context['curr_attendee']], {'oe_synchro_date':update_date,'google_internal_event_id': single_event_dict.get('id',False)},context)
@ -282,7 +282,7 @@ class google_calendar(osv.AbstractModel):
def create_new_events(self, cr, uid, context):
gc_pool = self.pool.get('google.calendar')
crm_meeting = self.pool['crm.meeting']
calendar_event = self.pool['calendar.event']
att_obj = self.pool['calendar.attendee']
user_obj = self.pool['res.users']
myPartnerID = user_obj.browse(cr,uid,uid,context=context).partner_id.id
@ -295,7 +295,7 @@ class google_calendar(osv.AbstractModel):
if not att.event_id.recurrent_id or att.event_id.recurrent_id == 0:
response = self.create_an_event(cr,uid,att.event_id,context=context)
update_date = datetime.strptime(response['updated'],"%Y-%m-%dT%H:%M:%S.%fz")
crm_meeting.write(cr, uid, att.event_id.id, {'oe_update_date':update_date})
calendar_event.write(cr, uid, att.event_id.id, {'oe_update_date':update_date})
att_obj.write(cr, uid, [att.id], {'google_internal_event_id': response['id'], 'oe_synchro_date':update_date})
cr.commit()
return True
@ -345,7 +345,7 @@ class google_calendar(osv.AbstractModel):
if context is None:
context = {}
crm_meeting = self.pool['crm.meeting']
calendar_event = self.pool['calendar.event']
user_obj = self.pool['res.users']
att_obj = self.pool['calendar.attendee']
myPartnerID = user_obj.browse(cr,uid,uid,context=context).partner_id.id
@ -521,7 +521,7 @@ class google_calendar(osv.AbstractModel):
if actSrc == 'GG':
res = self.update_from_google(cr, uid, False, event['GG_event'], "create", context=context_tmp)
event['OE_event_id'] = res
meeting = crm_meeting.browse(cr,uid,res,context=context)
meeting = calendar_event.browse(cr,uid,res,context=context)
attendee_record_id = att_obj.search(cr, uid, [('partner_id','=', myPartnerID), ('event_id','=',res)], context=context)
self.pool.get('calendar.attendee').write(cr,uid,attendee_record_id, {'oe_synchro_date':meeting.oe_update_date,'google_internal_event_id': event['GG_event']['id']},context=context_tmp)
elif actSrc == 'OE':
@ -549,17 +549,17 @@ class google_calendar(osv.AbstractModel):
else:
if event_to_synchronize[base_event][0][1].get('OE_event_id'):
parent_oe_id = event_to_synchronize[base_event][0][1].get('OE_event_id')
crm_meeting.unlink(cr,uid,"%s-%s" % (parent_oe_id,new_google_event_id),unlink_level=1,context=context)
calendar_event.unlink(cr,uid,"%s-%s" % (parent_oe_id,new_google_event_id),unlink_level=1,context=context)
elif actToDo == 'DELETE':
if actSrc == 'GG':
self.delete_an_event(cr,uid,current_event[0],context=context)
elif actSrc == 'OE':
crm_meeting.unlink(cr,uid,event['OE_event_id'],unlink_level=0,context=context)
calendar_event.unlink(cr,uid,event['OE_event_id'],unlink_level=0,context=context)
return True
def bind_recurring_events_to_google(self, cr, uid, context):
crm_meeting = self.pool['crm.meeting']
calendar_event = self.pool['calendar.event']
att_obj = self.pool.get('calendar.attendee')
user_obj = self.pool['res.users']
myPartnerID = user_obj.browse(cr,uid,uid,context=context).partner_id.id
@ -572,7 +572,7 @@ class google_calendar(osv.AbstractModel):
for att in att_obj.browse(cr,uid,my_att_ids,context=context):
if att.event_id.recurrent_id and att.event_id.recurrent_id > 0:
new_google_internal_event_id = False
source_event_record = crm_meeting.browse(cr, uid, att.event_id.recurrent_id, context)
source_event_record = calendar_event.browse(cr, uid, att.event_id.recurrent_id, context)
source_attendee_record_id = att_obj.search(cr, uid, [('partner_id','=', myPartnerID), ('event_id','=',source_event_record.id)], context=context)
source_attendee_record = att_obj.browse(cr, uid, source_attendee_record_id, context)
if source_attendee_record:
@ -670,8 +670,8 @@ class res_users(osv.Model):
}
class crm_meeting(osv.Model):
_inherit = "crm.meeting"
class calendar_event(osv.Model):
_inherit = "calendar.event"
def write(self, cr, uid, ids, vals, context=None):
if context is None:
@ -680,7 +680,7 @@ class crm_meeting(osv.Model):
if (set(vals.keys()) & sync_fields) and 'oe_update_date' not in vals.keys() and 'NewMeeting' not in context:
vals['oe_update_date'] = datetime.now()
return super(crm_meeting, self).write(cr, uid, ids, vals, context=context)
return super(calendar_event, self).write(cr, uid, ids, vals, context=context)
def copy(self, cr, uid, id, default=None, context=None):
default = default or {}
@ -691,7 +691,7 @@ class crm_meeting(osv.Model):
default['oe_update_date'] = datetime.now()
else:
default['oe_update_date'] = False
return super(crm_meeting, self).copy(cr, uid, id, default, context)
return super(calendar_event, self).copy(cr, uid, id, default, context)
_columns = {
'oe_update_date': fields.datetime('OpenERP Update Date'),
@ -718,7 +718,7 @@ class calendar_attendee(osv.Model):
# If attendees are updated, we need to specify that next synchro need an action
# Except if it come from an update_from_google
if not context.get('curr_attendee', False) and not context.get('NewMeeting', False):
self.pool.get('crm.meeting').write(cr, uid, ref, {'oe_update_date':datetime.now()},context)
self.pool.get('calendar.event').write(cr, uid, ref, {'oe_update_date':datetime.now()},context)
return super(calendar_attendee, self).write(cr, uid, ids, vals, context=context)

View File

@ -50,7 +50,7 @@ openerp.google_calendar = function(instance) {
instance.web_calendar.CalendarView.include({
extraSideBar: function() {
this._super();
if (this.dataset.model == "crm.meeting") {
if (this.dataset.model == "calendar.event") {
this.$el.find('.oe_calendar_filter').prepend(QWeb.render('GoogleCalendar.buttonSynchro'));
}
}

View File

@ -73,7 +73,7 @@ class hr_holidays_status(osv.osv):
_columns = {
'name': fields.char('Leave Type', size=64, required=True, translate=True),
'categ_id': fields.many2one('crm.meeting.type', 'Meeting Type',
'categ_id': fields.many2one('calendar.event.type', 'Meeting Type',
help='Once a leave is validated, OpenERP will create a corresponding meeting of this type in the calendar.'),
'color_name': fields.selection([('red', 'Red'),('blue','Blue'), ('lightgreen', 'Light Green'), ('lightblue','Light Blue'), ('lightyellow', 'Light Yellow'), ('magenta', 'Magenta'),('lightcyan', 'Light Cyan'),('black', 'Black'),('lightpink', 'Light Pink'),('brown', 'Brown'),('violet', 'Violet'),('lightcoral', 'Light Coral'),('lightsalmon', 'Light Salmon'),('lavender', 'Lavender'),('wheat', 'Wheat'),('ivory', 'Ivory')],'Color in Report', required=True, help='This color will be used in the leaves summary located in Reporting\Leaves by Department.'),
'limit': fields.boolean('Allow to Override Limit', help='If you select this check box, the system allows the employees to take more leaves than the available ones for this type and will not take them into account for the "Remaining Legal Leaves" defined on the employee form.'),
@ -171,7 +171,7 @@ class hr_holidays(osv.osv):
'notes': fields.text('Reasons',readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}),
'number_of_days_temp': fields.float('Allocation', readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}),
'number_of_days': fields.function(_compute_number_of_days, string='Number of Days', store=True),
'meeting_id': fields.many2one('crm.meeting', 'Meeting'),
'meeting_id': fields.many2one('calendar.event', 'Meeting'),
'type': fields.selection([('remove','Leave Request'),('add','Allocation Request')], 'Request Type', required=True, readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}, help="Choose 'Leave Request' if someone wants to take an off-day. \nChoose 'Allocation Request' if you want to increase the number of leaves available for someone", select=True),
'parent_id': fields.many2one('hr.holidays', 'Parent'),
'linked_request_ids': fields.one2many('hr.holidays', 'parent_id', 'Linked Requests',),
@ -360,7 +360,7 @@ class hr_holidays(osv.osv):
else:
self.write(cr, uid, [record.id], {'manager_id': manager})
if record.holiday_type == 'employee' and record.type == 'remove':
meeting_obj = self.pool.get('crm.meeting')
meeting_obj = self.pool.get('calendar.event')
meeting_vals = {
'name': record.name or _('Leave Request'),
'categ_ids': record.holiday_status_id.categ_id and [(6,0,[record.holiday_status_id.categ_id.id])] or [],
@ -422,7 +422,7 @@ class hr_holidays(osv.osv):
return True
def holidays_cancel(self, cr, uid, ids, context=None):
meeting_obj = self.pool.get('crm.meeting')
meeting_obj = self.pool.get('calendar.event')
for record in self.browse(cr, uid, ids):
# Delete the meeting
if record.meeting_id:

View File

@ -513,7 +513,7 @@
id="act_hr_leave_request_to_meeting"
name="Leave Meetings"
src_model="hr.holidays"
res_model="crm.meeting"
res_model="calendar.event"
view_mode="tree,form,calendar,gantt"
view_type="form"/>

View File

@ -5,6 +5,6 @@ access_hr_holydays_status_employee,hr.holidays.status employee,model_hr_holidays
access_hr_holydays_status_manager,hr.holidays.status manager,model_hr_holidays_status,base.group_hr_manager,1,1,1,1
access_hr_holidays_remain_user,hr.holidays.ramain.user,model_hr_holidays_remaining_leaves_user,base.group_hr_user,1,1,1,1
access_resource_calendar_leaves_user,resource_calendar_leaves_user,resource.model_resource_calendar_leaves,base.group_hr_user,1,1,1,1
access_crm_meeting_hr_user,crm.meeting.hr.user,calendar.model_crm_meeting,base.group_hr_user,1,1,1,1
access_crm_meeting_type_manager,crm.meeting.type.manager,calendar.model_crm_meeting_type,base.group_hr_manager,1,1,1,1
access_calendar_event_hr_user,calendar.event.hr.user,calendar.model_calendar_event,base.group_hr_user,1,1,1,1
access_calendar_event_type_manager,calendar.event.type.manager,calendar.model_calendar_event_type,base.group_hr_manager,1,1,1,1
access_calendar_attendee_hr_user,calendar.attendee.hr.user,calendar.model_calendar_attendee,base.group_hr_user,1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
5 access_hr_holydays_status_manager hr.holidays.status manager model_hr_holidays_status base.group_hr_manager 1 1 1 1
6 access_hr_holidays_remain_user hr.holidays.ramain.user model_hr_holidays_remaining_leaves_user base.group_hr_user 1 1 1 1
7 access_resource_calendar_leaves_user resource_calendar_leaves_user resource.model_resource_calendar_leaves base.group_hr_user 1 1 1 1
8 access_crm_meeting_hr_user access_calendar_event_hr_user crm.meeting.hr.user calendar.event.hr.user calendar.model_crm_meeting calendar.model_calendar_event base.group_hr_user 1 1 1 1
9 access_crm_meeting_type_manager access_calendar_event_type_manager crm.meeting.type.manager calendar.event.type.manager calendar.model_crm_meeting_type calendar.model_calendar_event_type base.group_hr_manager 1 1 1 1
10 access_calendar_attendee_hr_user calendar.attendee.hr.user calendar.model_calendar_attendee base.group_hr_user 1 1 1 1

View File

@ -56,7 +56,7 @@ class TestHolidaysFlow(TestHrHolidaysBase):
self.holidays_status_0 = self.hr_holidays_status.create(cr, self.user_hrmanager_id, {
'name': 'WithMeetingType',
'limit': True,
'categ_id': self.registry('crm.meeting.type').create(cr, self.user_hrmanager_id, {'name': 'NotLimitedMeetingType'}),
'categ_id': self.registry('calendar.event.type').create(cr, self.user_hrmanager_id, {'name': 'NotLimitedMeetingType'}),
})
self.holidays_status_1 = self.hr_holidays_status.create(cr, self.user_hrmanager_id, {
'name': 'NotLimited',

View File

@ -303,7 +303,7 @@ class hr_applicant(osv.Model):
if applicant.department_id and applicant.department_id.manager_id and applicant.department_id.manager_id.user_id and applicant.department_id.manager_id.user_id.partner_id:
applicant_ids.append(applicant.department_id.manager_id.user_id.partner_id.id)
category = self.pool.get('ir.model.data').get_object(cr, uid, 'hr_recruitment', 'categ_meet_interview', context)
res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid, 'calendar', 'action_crm_meeting', context)
res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid, 'calendar', 'action_calendar_event', context)
res['context'] = {
'default_partner_ids': applicant_ids,
'default_user_id': uid,

View File

@ -13,7 +13,7 @@
</record>
<!-- Meeting Types (for interview meetings) -->
<record model="crm.meeting.type" id="categ_meet_interview">
<record model="calendar.event.type" id="categ_meet_interview">
<field name="name">Interview</field>
</record>

View File

@ -10,7 +10,7 @@
<act_window
id="act_hr_applicant_to_meeting"
name="Meetings"
res_model="crm.meeting"
res_model="calendar.event"
src_model="hr.applicant"
view_mode="calendar,tree,form,graph"
view_type="form"/>

View File

@ -983,7 +983,7 @@ msgid "New"
msgstr ""
#. module: hr_recruitment
#: model:crm.meeting.type,name:hr_recruitment.categ_meet_interview
#: model:calendar.event.type,name:hr_recruitment.categ_meet_interview
#: view:hr.job:0
msgid "Interview"
msgstr ""

View File

@ -5,9 +5,9 @@ access_hr_recruitment_stage_user,hr.recruitment.stage.user,model_hr_recruitment_
access_hr_recruitment_degree,hr.recruitment.degree,model_hr_recruitment_degree,base.group_hr_user,1,1,1,1
access_res_partner_hr_user,res.partner.user,base.model_res_partner,base.group_hr_user,1,1,1,1
access_survey_hr_user,survey.hr.user,survey.model_survey,base.group_hr_user,1,1,1,0
access_crm_meeting_hruser,crm.meeting.hruser,calendar.model_crm_meeting,base.group_hr_user,1,1,1,1
access_calendar_event_hruser,calendar.event.hruser,calendar.model_calendar_event,base.group_hr_user,1,1,1,1
access_hr_recruitment_source_hr_officer,hr.recruitment.source,model_hr_recruitment_source,base.group_hr_user,1,1,1,1
access_hr_recruitment_source_all,hr.recruitment.source,model_hr_recruitment_source,,1,0,0,0
access_hr_applicant_category,hr.applicant_category,model_hr_applicant_category,,1,1,1,0
access_hr_applicant_category_manager,hr.applicant_category,model_hr_applicant_category,base.group_hr_manager,1,1,1,1
access_crm_meeting_type_hr_officer,crm.meeting.type.officer,calendar.model_crm_meeting_type,base.group_hr_user,1,1,1,0
access_calendar_event_type_hr_officer,calendar.event.type.officer,calendar.model_calendar_event_type,base.group_hr_user,1,1,1,0

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
5 access_hr_recruitment_degree hr.recruitment.degree model_hr_recruitment_degree base.group_hr_user 1 1 1 1
6 access_res_partner_hr_user res.partner.user base.model_res_partner base.group_hr_user 1 1 1 1
7 access_survey_hr_user survey.hr.user survey.model_survey base.group_hr_user 1 1 1 0
8 access_crm_meeting_hruser access_calendar_event_hruser crm.meeting.hruser calendar.event.hruser calendar.model_crm_meeting calendar.model_calendar_event base.group_hr_user 1 1 1 1
9 access_hr_recruitment_source_hr_officer hr.recruitment.source model_hr_recruitment_source base.group_hr_user 1 1 1 1
10 access_hr_recruitment_source_all hr.recruitment.source model_hr_recruitment_source 1 0 0 0
11 access_hr_applicant_category hr.applicant_category model_hr_applicant_category 1 1 1 0
12 access_hr_applicant_category_manager hr.applicant_category model_hr_applicant_category base.group_hr_manager 1 1 1 1
13 access_crm_meeting_type_hr_officer access_calendar_event_type_hr_officer crm.meeting.type.officer calendar.event.type.officer calendar.model_crm_meeting_type calendar.model_calendar_event_type base.group_hr_user 1 1 1 0

View File

@ -1,3 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_crm_meeting_portal,crm.meeting.portal,calendar.model_crm_meeting,portal.group_portal,1,1,0,0
access_crm_meeting_type_portal,crm.meeting.type.portal,calendar.model_crm_meeting_type,portal.group_portal,1,0,0,0
access_calendar_event_portal,calendar.event.portal,calendar.model_calendar_event,portal.group_portal,1,1,0,0
access_calendar_event_type_portal,calendar.event.type.portal,calendar.model_calendar_event_type,portal.group_portal,1,0,0,0

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_crm_meeting_portal access_calendar_event_portal crm.meeting.portal calendar.event.portal calendar.model_crm_meeting calendar.model_calendar_event portal.group_portal 1 1 0 0
3 access_crm_meeting_type_portal access_calendar_event_type_portal crm.meeting.type.portal calendar.event.type.portal calendar.model_crm_meeting_type calendar.model_calendar_event_type portal.group_portal 1 0 0 0