[IMP] Event form view
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<odoo>
|
||||
<record model="web.tip" id="event_tip_1">
|
||||
<field name="title"></field>
|
||||
<field name="description">By clicking here, you can create and manage registration(s) for this event, send emails to attendee(s) and print identification badges.</field>
|
||||
<field name="description">Create and manage registrations for this event, send emails to attendees and print identification badges.</field>
|
||||
<field name="action_id" ref="event.action_event_view"/>
|
||||
<field name="model">event.event</field>
|
||||
<field name="mode">form</field>
|
||||
|
||||
@@ -29,7 +29,7 @@ class event_event(models.Model):
|
||||
_order = 'date_begin'
|
||||
|
||||
name = fields.Char(
|
||||
string='Name', translate=True, required=True,
|
||||
string='Event Name', translate=True, required=True,
|
||||
readonly=False, states={'done': [('readonly', True)]})
|
||||
active = fields.Boolean(default=True, track_visibility="onchange")
|
||||
user_id = fields.Many2one(
|
||||
@@ -60,20 +60,20 @@ class event_event(models.Model):
|
||||
|
||||
# Seats and computation
|
||||
seats_max = fields.Integer(
|
||||
string='Maximum Available Seats', oldname='register_max',
|
||||
string='Maximum Attendees Number', oldname='register_max',
|
||||
readonly=True, states={'draft': [('readonly', False)], 'confirm': [('readonly', False)]},
|
||||
help="For each event you can define a maximum registration of seats(number of attendees), above this numbers the registrations are not accepted.")
|
||||
seats_availability = fields.Selection(
|
||||
[('limited', 'Limited'), ('unlimited', 'Unlimited')],
|
||||
'Available Seat', required=True, default='unlimited')
|
||||
'Maximum Attendees', required=True, default='unlimited')
|
||||
seats_min = fields.Integer(
|
||||
string='Minimum Reservation of Seats Required', oldname='register_min',
|
||||
help="For each event you can define a minimum reserved seats(number of attendees), if it does not reach the mentioned registrations the event can not be confirmed (keep 0 to ignore this rule)")
|
||||
string='Minimum Attendees', oldname='register_min',
|
||||
help="For each event you can define a minimum reserved seats (number of attendees), if it does not reach the mentioned registrations the event can not be confirmed (keep 0 to ignore this rule)")
|
||||
seats_reserved = fields.Integer(
|
||||
oldname='register_current', string='Reserved Seats',
|
||||
store=True, readonly=True, compute='_compute_seats')
|
||||
seats_available = fields.Integer(
|
||||
oldname='register_avail', string='Available Seats',
|
||||
oldname='register_avail', string='Maximum Attendees',
|
||||
store=True, readonly=True, compute='_compute_seats')
|
||||
seats_unconfirmed = fields.Integer(
|
||||
oldname='register_prospect', string='Unconfirmed Seat Reservations',
|
||||
@@ -158,7 +158,7 @@ class event_event(models.Model):
|
||||
('confirm', 'Confirmed'), ('done', 'Done')],
|
||||
string='Status', default='draft', readonly=True, required=True, copy=False,
|
||||
help="If event is created, the status is 'Draft'. If event is confirmed for the particular dates the status is set to 'Confirmed'. If the event is over, the status is set to 'Done'. If event is cancelled the status is set to 'Cancelled'.")
|
||||
auto_confirm = fields.Boolean(string='Auto Confirmation Activated', compute='_compute_auto_confirm')
|
||||
auto_confirm = fields.Boolean(string='Confirmation not required', compute='_compute_auto_confirm')
|
||||
|
||||
@api.one
|
||||
def _compute_auto_confirm(self):
|
||||
|
||||
@@ -101,10 +101,18 @@
|
||||
<page name="registrations" string="Registrations">
|
||||
<group>
|
||||
<group>
|
||||
<field name="auto_confirm" invisible="1"/>
|
||||
<field name="seats_min"/>
|
||||
<field name="seats_availability" widget='radio'/>
|
||||
<field name="seats_max" attrs="{'invisible': [('seats_availability', '=', 'unlimited')], 'required': [('seats_availability', '=', 'limited')]}"/>
|
||||
<label for="seats_availability"/>
|
||||
<div>
|
||||
<field name="seats_availability" widget='radio'/>
|
||||
<span attrs="{'invisible': [('seats_availability', '=', 'unlimited')]}" class="oe_read_only">
|
||||
to
|
||||
</span>
|
||||
<field name="seats_max" attrs="{'invisible': [('seats_availability', '=', 'unlimited')], 'required': [('seats_availability', '=', 'limited')]}"/>
|
||||
</div>
|
||||
</group>
|
||||
<group>
|
||||
<field name="auto_confirm" groups="base.group_no_one"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
@@ -198,11 +206,11 @@
|
||||
</div>
|
||||
<h4>
|
||||
<a name="%(act_event_registration_from_event)d" type="action">
|
||||
<t t-esc="record.seats_expected.raw_value"> Attendees Expected</t>
|
||||
<t t-esc="record.seats_expected.raw_value"> Attendees expected</t>
|
||||
</a>
|
||||
<t t-if="(record.seats_reserved.raw_value + record.seats_used.raw_value) > 0 "><br/>
|
||||
<t t-esc="record.seats_reserved.raw_value + record.seats_used.raw_value"/> Attendees Confirmed
|
||||
<a name="action_event_registration_report" type="object" >(Report)</a>
|
||||
<t t-esc="record.seats_reserved.raw_value + record.seats_used.raw_value"/> Attendees confirmed
|
||||
<a name="action_event_registration_report" type="object" >(stats)</a>
|
||||
</t>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
@@ -18,14 +18,16 @@
|
||||
<xpath expr="//field[@name='organizer_id']" position="after">
|
||||
<field name="twitter_hashtag"/>
|
||||
</xpath>
|
||||
<xpath expr="//div[@name='button_box']/button" position="before">
|
||||
<xpath expr="//button[@name='button_done']" position="before">
|
||||
<button name="action_open_badge_editor"
|
||||
type="object"
|
||||
class="oe_stat_button"
|
||||
icon="fa-newspaper-o"
|
||||
string="Badge"
|
||||
help="Edit Event Badge">
|
||||
</button>
|
||||
states="confirm"
|
||||
string="Print Badges"
|
||||
class="oe_highlight"/>
|
||||
<button name="action_open_badge_editor"
|
||||
type="object"
|
||||
states="done"
|
||||
string="Print Badges"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -166,7 +166,7 @@ class event_event(models.Model):
|
||||
track_ids = fields.One2many('event.track', 'event_id', 'Tracks')
|
||||
sponsor_ids = fields.One2many('event.sponsor', 'event_id', 'Sponsors')
|
||||
blog_id = fields.Many2one('blog.blog', 'Event Blog')
|
||||
show_track_proposal = fields.Boolean('Talks Proposals')
|
||||
show_track_proposal = fields.Boolean('Tracks Proposals')
|
||||
show_tracks = fields.Boolean('Show Tracks on Website')
|
||||
show_blog = fields.Boolean('News')
|
||||
count_tracks = fields.Integer('Tracks', compute='_count_tracks')
|
||||
|
||||
@@ -322,20 +322,21 @@ Tracks define the agenda of your event. These can be a talk, a round table, a me
|
||||
<button name="%(action_event_track_from_event)d"
|
||||
type="action"
|
||||
class="oe_stat_button"
|
||||
icon="fa-inbox">
|
||||
icon="fa-inbox"
|
||||
attrs="{'invisible': [('show_tracks', '=', False), ('show_track_proposal', '=', False)]}">
|
||||
<field name="count_tracks" widget="statinfo"/>
|
||||
</button>
|
||||
<button name="%(action_event_sponsor_from_event)d"
|
||||
type="action"
|
||||
class="oe_stat_button"
|
||||
icon="fa-users">
|
||||
<field name="count_sponsor" widget="statinfo" string="Sponsorships"/>
|
||||
<field name="count_sponsor" widget="statinfo" string="Sponsors"/>
|
||||
</button>
|
||||
</div>
|
||||
<xpath expr="//div[@class='oe_title']" position="inside">
|
||||
<div name="event_checkboxes">
|
||||
<field name="show_menu" groups="base.group_no_one"/>
|
||||
<label for="show_menu" groups="base.group_no_one"/>
|
||||
<field name="show_menu"/>
|
||||
<label for="show_menu"/>
|
||||
<field name="show_tracks"/>
|
||||
<label for="show_tracks"/>
|
||||
<field name="show_track_proposal"/>
|
||||
|
||||
Reference in New Issue
Block a user