[NEW] Adding tracks management for events (community meeting)
bzr revid: fp@tinyerp.com-20131123092728-jo2f197rjnt39z7g
This commit is contained in:
parent
2b4f2a0599
commit
57585307fa
|
@ -41,7 +41,6 @@ class event_type(osv.osv):
|
|||
'default_registration_max': 0,
|
||||
}
|
||||
|
||||
|
||||
class event_event(osv.osv):
|
||||
"""Event"""
|
||||
_name = 'event.event'
|
||||
|
@ -202,14 +201,12 @@ class event_event(osv.osv):
|
|||
'email_registration_id' : fields.many2one('email.template','Registration Confirmation Email', help='This field contains the template of the mail that will be automatically sent each time a registration for this event is confirmed.'),
|
||||
'email_confirmation_id' : fields.many2one('email.template','Event Confirmation Email', help="If you set an email template, each participant will receive this email announcing the confirmation of the event."),
|
||||
'reply_to': fields.char('Reply-To Email', size=64, readonly=False, states={'done': [('readonly', True)]}, help="The email address of the organizer is likely to be put here, with the effect to be in the 'Reply-To' of the mails sent automatically at event or registrations confirmation. You can also put the email address of your mail gateway if you use one."),
|
||||
'main_speaker_id': fields.many2one('res.partner','Main Speaker', readonly=False, states={'done': [('readonly', True)]}, help="Speaker who will be giving speech at the event."),
|
||||
'address_id': fields.many2one('res.partner','Location', readonly=False, states={'done': [('readonly', True)]}),
|
||||
'street': fields.related('address_id','street',type='char',string='Street'),
|
||||
'street2': fields.related('address_id','street2',type='char',string='Street2'),
|
||||
'state_id': fields.related('address_id','state_id',type='many2one', relation="res.country.state", string='State'),
|
||||
'zip': fields.related('address_id','zip',type='char',string='zip'),
|
||||
'city': fields.related('address_id','city',type='char',string='city'),
|
||||
'speaker_confirmed': fields.boolean('Speaker Confirmed', readonly=False, states={'done': [('readonly', True)]}),
|
||||
'country_id': fields.related('address_id', 'country_id',
|
||||
type='many2one', relation='res.country', string='Country', readonly=False, states={'done': [('readonly', True)]}, store=True),
|
||||
'description': fields.html(
|
||||
|
|
|
@ -76,18 +76,18 @@
|
|||
<div class="oe_title">
|
||||
<label for="name" class="oe_edit_only"/>
|
||||
<h1><field name="name"/></h1>
|
||||
<field name="visibility"/>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="address_id" on_change="on_change_address_id(address_id)" context="{'show_address': 1}" options='{"always_reload": True}'/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="user_id"/>
|
||||
<field name="type" on_change="onchange_event_type(type,context)" />
|
||||
<field name="date_begin" on_change="onchange_start_date(date_begin,date_end)"/>
|
||||
<field name="date_end"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="visibility"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
|
@ -102,10 +102,6 @@
|
|||
</div>
|
||||
<field name="register_attended"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="main_speaker_id" domain="[('speaker','=',True)]" context="{'default_speaker':1}"/>
|
||||
<field name="speaker_confirmed"/>
|
||||
</group>
|
||||
</group>
|
||||
<field name="registration_ids" colspan="4" nolabel="1" groups="event.group_event_manager,event.group_event_user">
|
||||
<tree string="Registration" editable="top">
|
||||
|
@ -175,7 +171,6 @@
|
|||
<field name="register_current"/>
|
||||
<field name="register_min"/>
|
||||
<field name="register_max" invisible="1"/>
|
||||
<field name="main_speaker_id" groups="base.group_no_one"/>
|
||||
<field name="user_id"/>
|
||||
<field name="state"/>
|
||||
<field name="message_unread" invisible="1"/>
|
||||
|
|
|
@ -44,7 +44,6 @@ class report_event_registration(osv.osv):
|
|||
'user_id': fields.many2one('res.users', 'Event Responsible', readonly=True),
|
||||
'user_id_registration': fields.many2one('res.users', 'Register', readonly=True),
|
||||
'name_registration': fields.char('Participant / Contact Name',size=45, readonly=True),
|
||||
'speaker_id': fields.many2one('res.partner', 'Speaker', readonly=True),
|
||||
'company_id': fields.many2one('res.company', 'Company', readonly=True),
|
||||
}
|
||||
_order = 'event_date desc'
|
||||
|
@ -64,7 +63,6 @@ class report_event_registration(osv.osv):
|
|||
r.user_id AS user_id_registration,
|
||||
r.name AS name_registration,
|
||||
e.company_id AS company_id,
|
||||
e.main_speaker_id AS speaker_id,
|
||||
to_char(e.date_begin, 'YYYY-MM-DD') AS event_date,
|
||||
to_char(e.date_begin, 'YYYY') AS year,
|
||||
to_char(e.date_begin, 'MM') AS month,
|
||||
|
@ -91,7 +89,6 @@ class report_event_registration(osv.osv):
|
|||
e.user_id,
|
||||
event_state,
|
||||
e.company_id,
|
||||
e.main_speaker_id,
|
||||
year,
|
||||
month,
|
||||
e.register_max,
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import controllers
|
||||
import models
|
|
@ -0,0 +1,27 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
{
|
||||
'name': 'Tracks and Agenda of Events',
|
||||
'category': 'Website',
|
||||
'summary': 'Organize Your Events',
|
||||
'version': '1.0',
|
||||
'description': """
|
||||
Online Events
|
||||
=============
|
||||
|
||||
""",
|
||||
'author': 'OpenERP SA',
|
||||
'depends': ['website_event', 'website_blog'],
|
||||
'data': [
|
||||
'data/event_view.xml',
|
||||
'data/event_data.xml',
|
||||
'views/website_event.xml',
|
||||
'security/ir.model.access.csv',
|
||||
'security/website_event.xml',
|
||||
],
|
||||
'qweb': ['static/src/xml/*.xml'],
|
||||
'demo': [
|
||||
'data/event_demo.xml'
|
||||
],
|
||||
'installable': True,
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
<record id="event_track_stage1" model="event.track.stage">
|
||||
<field name="name">Proposals</field>
|
||||
</record>
|
||||
<record id="event_track_stage1" model="event.track.stage">
|
||||
<field name="name">Confirmed</field>
|
||||
</record>
|
||||
<record id="event_track_stage1" model="event.track.stage">
|
||||
<field name="name">Published</field>
|
||||
</record>
|
||||
<record id="event_track_stage1" model="event.track.stage">
|
||||
<field name="name">Announced</field>
|
||||
</record>
|
||||
<record id="event_track_stage1" model="event.track.stage">
|
||||
<field name="name">Completed</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="event_tag1" model="event.tag">
|
||||
<field name="name">Technical</field>
|
||||
</record>
|
||||
<record id="event_tag2" model="event.tag">
|
||||
<field name="name">Business</field>
|
||||
</record>
|
||||
<record id="event_tag3" model="event.tag">
|
||||
<field name="name">Lightning Talks</field>
|
||||
</record>
|
||||
<record id="event_tag4" model="event.tag">
|
||||
<field name="name">Round Table</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="event_track_location1" model="event.track_location">
|
||||
<field name="name">Room 1</field>
|
||||
</record>
|
||||
<record id="event_track_location1" model="event.track_location">
|
||||
<field name="name">Room 2</field>
|
||||
</record>
|
||||
<record id="event_track_location1" model="event.track_location">
|
||||
<field name="name">Room 3</field>
|
||||
</record>
|
||||
<record id="event_track_location1" model="event.track_location">
|
||||
<field name="name">Room 4</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -0,0 +1,274 @@
|
|||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="act_event_list_tracks" model="ir.actions.act_window">
|
||||
<field name="res_model">event.track</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="name">Event Tracks</field>
|
||||
<field name="view_mode">kanban,tree,form,calendar,graph</field>
|
||||
<field name="context">{'search_default_event_id': active_id, 'default_event_id': active_id}</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- EVENTS/CONFIGURATION/EVENT locations -->
|
||||
<record model="ir.ui.view" id="view_event_location_form">
|
||||
<field name="name">Event Locations</field>
|
||||
<field name="model">event.location</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Event Location" version="7.0">
|
||||
<field name="name"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="view_event_location_tree">
|
||||
<field name="name">Event Location</field>
|
||||
<field name="model">event.location</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Event Location">
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="action_event_location">
|
||||
<field name="name">Event Locations</field>
|
||||
<field name="res_model">event.location</field>
|
||||
</record>
|
||||
<menuitem name="Event Locations" id="menu_event_location" action="action_event_location" parent="base.menu_marketing_config_root" groups="base.group_no_one"/>
|
||||
|
||||
<!-- EVENTS/CONFIGURATION/EVENT Stages -->
|
||||
<record model="ir.ui.view" id="view_event_stage_form">
|
||||
<field name="name">Event Stages</field>
|
||||
<field name="model">event.stage</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Event Stage" version="7.0">
|
||||
<field name="name"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="view_event_stage_tree">
|
||||
<field name="name">Event Stage</field>
|
||||
<field name="model">event.stage</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Event Stage">
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="action_event_stage">
|
||||
<field name="name">Event Stages</field>
|
||||
<field name="res_model">event.stage</field>
|
||||
</record>
|
||||
<menuitem name="Event Stages" id="menu_event_stage" action="action_event_stage" parent="base.menu_marketing_config_root" groups="base.group_no_one"/>
|
||||
|
||||
<!-- EVENTS/CONFIGURATION/EVENT Tags -->
|
||||
<record model="ir.ui.view" id="view_event_tag_form">
|
||||
<field name="name">Event Tags</field>
|
||||
<field name="model">event.tag</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Event Tag" version="7.0">
|
||||
<field name="name"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="view_event_tag_tree">
|
||||
<field name="name">Event Tag</field>
|
||||
<field name="model">event.tag</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Event Tag">
|
||||
<field name="name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="action_event_tag">
|
||||
<field name="name">Event Tags</field>
|
||||
<field name="res_model">event.tag</field>
|
||||
</record>
|
||||
<menuitem name="Event Tags" id="menu_event_tag" action="action_event_tag" parent="base.menu_marketing_config_root" groups="base.group_no_one"/>
|
||||
|
||||
<!-- Events Organisation/CONFIGURATION/EVENTS -->
|
||||
|
||||
<record model="ir.ui.view" id="view_event_track_form">
|
||||
<field name="name">Event Tracks</field>
|
||||
<field name="inherit_id" ref="event.view_event_from"/>
|
||||
<field name="model">event.event</field>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="div[@class='oe_title']" position="inside">
|
||||
<field name="tag_ids"/>
|
||||
</xpath>
|
||||
<xpath expr="div[@class='oe_button_box']" position="inside">
|
||||
<button name="%(event.act_event_list_tracks)d" type="action" string="Tracks"/>
|
||||
<button name="%(event.act_event_list_tracks)d" type="action" string="Activate Blog"/>
|
||||
<button name="%(event.act_event_list_tracks)d" type="action" string="Desactivate Blog"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Event Tracks -->
|
||||
|
||||
<record model="ir.ui.view" id="view_event_track_kanban">
|
||||
<field name="name">event.track.kanban</field>
|
||||
<field name="model">event.track</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban version="7.0" string="Tracks">
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_project oe_kanban_global_click">
|
||||
<div class="oe_dropdown_toggle oe_dropdown_kanban" groups="base.group_user">
|
||||
<span class="oe_e">í</span>
|
||||
<ul class="oe_dropdown_menu">
|
||||
<t t-if="widget.view.is_action_enabled('edit')"><li><a type="edit">View Track</a></li></t>
|
||||
<t t-if="widget.view.is_action_enabled('edit')"><li><a type="edit">Edit Track</a></li></t>
|
||||
<t t-if="widget.view.is_action_enabled('delete')"><li><a type="delete">Delete</a></li></t>
|
||||
<li><ul class="oe_kanban_colorpicker" data-field="color"/></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="oe_kanban_content">
|
||||
<h4><field name="name"/></h4>
|
||||
<field name="tag_ids"/>
|
||||
<div>
|
||||
<field name="date"/>
|
||||
<field name="duration"/> hours
|
||||
</div>
|
||||
<div class="oe_kanban_project_avatars">
|
||||
<t t-foreach="record.speaker_ids.raw_value.slice(0,11)" t-as="speaker">
|
||||
<img t-att-src="kanban_image('res.partner', 'image_small', speaker)" t-att-data-speaker_id="speaker"/>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_event_track_calendar" model="ir.ui.view">
|
||||
<field name="name">event.track.calendar</field>
|
||||
<field name="model">event.track</field>
|
||||
<field eval="2" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<calendar color="type" date_start="date" date_duration="duration" string="Event Tracks">
|
||||
<field name="name"/>
|
||||
<field name="event_id"/>
|
||||
</calendar>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="view_event_track_search">
|
||||
<field name="name">Event Tracks</field>
|
||||
<field name="model">event.track</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Event Tracks">
|
||||
<field name="name"/>
|
||||
<field name="event_id"/>
|
||||
<field name="stage_id"/>
|
||||
<field name="speaker_ids"/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Responsible" context="{'group_by': 'user_id'}"/>
|
||||
<filter string="Stage" context="{'group_by':'stage_id'}"/>
|
||||
<filter string="Date" context="{'group_by':'date'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_event_track_form">
|
||||
<field name="name">event.track.form</field>
|
||||
<field name="model">event.track</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Event Track" version="7.0">
|
||||
<header>
|
||||
<button name="publish" string="Publish"/>
|
||||
<button name="unpublish" string="Publish"/>
|
||||
<field name="stage_id" widget="statusbar"/>
|
||||
</header>
|
||||
<sheet string="Track">
|
||||
<div class="oe_title">
|
||||
<label for="name" class="oe_edit_only"/>
|
||||
<h1>
|
||||
<field name="name"/>
|
||||
</h1>
|
||||
<label for="event_id" class="oe_edit_only"/>
|
||||
<h2>
|
||||
<field name="event_id"/>
|
||||
</h2>
|
||||
<label for="tag_ids" class="oe_edit_only"/>
|
||||
<h2>
|
||||
<field name="tag_ids"/>
|
||||
</h2>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="user_id"/>
|
||||
<field name="speaker_ids"/>
|
||||
<field name="location_id"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="date"/>
|
||||
<field name="duration"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_event_track_graph">
|
||||
<field name="name">Tracks Graph</field>
|
||||
<field name="model">event.track</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Tracks" type="bar" orientation="horizontal">
|
||||
<field name="location_id"/>
|
||||
<field name="duration" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Search view of event registration -->
|
||||
<record model="ir.ui.view" id="view_registration_search">
|
||||
<field name="name">Registrations</field>
|
||||
<field name="model">event.registration</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Event Registration">
|
||||
<field name="name" string="Participant" filter_domain="['|','|',('name','ilike',self),('email','ilike',self),('origin','ilike',self)]"/>
|
||||
<filter icon="terp-mail-message-new" string="Unread Messages" name="message_unread" domain="[('message_unread','=',True)]"/>
|
||||
<separator/>
|
||||
<filter icon="terp-check" string="New" name="draft" domain="[('state','=','draft')]" help="Registrations in unconfirmed state"/>
|
||||
<filter icon="terp-camera_test" string="Confirmed" domain="[('state','=','open')]" help="Confirmed registrations"/>
|
||||
<separator/>
|
||||
<filter icon="terp-personal" string="My Registrations" help="My Registrations" domain="[('user_id','=',uid)]"/>
|
||||
<field name="event_id"/>
|
||||
<field name="user_id"/>
|
||||
<field name="partner_id"/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Event" icon="terp-crm" domain="[]" context="{'group_by':'event_id'}"/>
|
||||
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_registration">
|
||||
<field name="name">Registrations</field>
|
||||
<field name="res_model">event.registration</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="domain"></field>
|
||||
<field name="view_mode">tree,form,calendar,graph</field>
|
||||
<field name="context">{}</field>
|
||||
<field name="search_view_id" ref="view_registration_search"/>
|
||||
</record>
|
||||
|
||||
<menuitem name="Registrations"
|
||||
id="menu_action_registration" parent="base.menu_event_main"
|
||||
action="action_registration" groups="event.group_event_manager,event.group_event_user"/>
|
||||
|
||||
<menuitem name="Reporting" id="base.menu_report_association" parent="event_main_menu" sequence="20"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -0,0 +1,83 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from openerp.osv import fields, osv
|
||||
from openerp.tools.translate import _
|
||||
|
||||
class event_tag(osv.osv):
|
||||
_name = "event.tag"
|
||||
_columns = {
|
||||
'name': fields.char('Event Tag')
|
||||
}
|
||||
|
||||
#
|
||||
# Tracks: conferences
|
||||
#
|
||||
|
||||
class event_track_stage(osv.osv):
|
||||
_name = "event.track.stage"
|
||||
_columns = {
|
||||
'name': fields.char('Track Stage')
|
||||
}
|
||||
|
||||
|
||||
class event_track_location(osv.osv):
|
||||
_name = "event.track.location"
|
||||
_columns = {
|
||||
'name': fields.char('Track Rooms')
|
||||
}
|
||||
|
||||
class event_track(osv.osv):
|
||||
_name = "event.track"
|
||||
_order = 'date'
|
||||
_inherit = ['mail.thread', 'ir.needaction_mixin']
|
||||
_columns = {
|
||||
'name': fields.char('Track Title', required=True),
|
||||
'user_id': fields.many2one('res.users', 'Responsible'),
|
||||
'speaker_ids': fields.many2many('res.partner'),
|
||||
'tag_ids': fields.many2many('event.track.tag'),
|
||||
'stage_id': fields.many2one('event.track.stage'),
|
||||
'description': fields.html('Track Description'),
|
||||
'date': fields.datetime('Track Date'),
|
||||
'duration': fields.float('Duration (Hours)'),
|
||||
'location_id': fields.many2one('event.track.location'),
|
||||
'attachment_show': fields.boolean('Show Documents'),
|
||||
'event_id': fields.many2one('event.event', 'Event', required=True),
|
||||
'color': fields.integer('Color Index'),
|
||||
}
|
||||
_defaults = {
|
||||
'user_id': lambda self, cr, uid, ctx: uid,
|
||||
'attachment_show': lambda self, cr, uid, ctx: True,
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Events
|
||||
#
|
||||
|
||||
class event_event(osv.osv):
|
||||
_inherit = "event.event"
|
||||
_columns = {
|
||||
'tag_ids': fields.many2many('Tags'),
|
||||
'track_ids': fields.one2many('event.track', 'event_id', 'Tracks'),
|
||||
'blog_id': fields.many2one('blog.blog', 'Event Blog'),
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="event_track_public" model="ir.rule">
|
||||
<field name="name">event tracks: Public</field>
|
||||
<field name="model_id" ref="event.model_event_track"/>
|
||||
<field name="domain_force">[('website_published', '=', True)]</field>
|
||||
<field name="groups" eval="[(4, ref('base.group_public')), (4, ref('base.group_portal'))]"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="False"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_unlink" eval="False"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -0,0 +1,4 @@
|
|||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_event_tag_manager,event.tag manager,model_event_tag,event.group_event_user,1,1,1,1
|
||||
access_event_location_manager,event.track.location manager,model_event_track_location,event.group_event_user,1,1,1,1
|
||||
access_event_track_manager,event.track manager,model_event_track,event.group_event_user,1,1,1,1
|
|
Loading…
Reference in New Issue