summaryrefslogtreecommitdiff
path: root/addons/event/models
diff options
context:
space:
mode:
Diffstat (limited to 'addons/event/models')
-rw-r--r--addons/event/models/event_event.py11
-rw-r--r--addons/event/models/event_registration.py10
2 files changed, 10 insertions, 11 deletions
diff --git a/addons/event/models/event_event.py b/addons/event/models/event_event.py
index 89d31e3c8da..00ca45c62a7 100644
--- a/addons/event/models/event_event.py
+++ b/addons/event/models/event_event.py
@@ -37,7 +37,7 @@ class EventType(models.Model):
has_seats_limitation = fields.Boolean('Limited Seats')
seats_max = fields.Integer(
'Maximum Registrations', compute='_compute_default_registration',
- copy=True, readonly=False, store=True,
+ readonly=False, store=True,
help="It will select this default maximum value when you choose this event")
auto_confirm = fields.Boolean(
'Automatically Confirm Registrations', default=True,
@@ -139,10 +139,10 @@ class EventEvent(models.Model):
# Seats and computation
seats_max = fields.Integer(
string='Maximum Attendees Number',
- compute='_compute_from_event_type', copy=True, readonly=False, store=True,
+ compute='_compute_from_event_type', readonly=False, store=True,
help="For each event you can define a maximum registration of seats(number of attendees), above this numbers the registrations are not accepted.")
seats_limited = fields.Boolean('Maximum Attendees', required=True, compute='_compute_seats_limited',
- copy=True, readonly=False, store=True)
+ readonly=False, store=True)
seats_reserved = fields.Integer(
string='Reserved Seats',
store=True, readonly=True, compute='_compute_seats')
@@ -160,8 +160,7 @@ class EventEvent(models.Model):
compute_sudo=True, readonly=True, compute='_compute_seats')
# Registration fields
auto_confirm = fields.Boolean(
- string='Autoconfirmation',
- compute='_compute_from_event_type', copy=True, readonly=False, store=True,
+ string='Autoconfirmation', compute='_compute_from_event_type', readonly=False, store=True,
help='Autoconfirm Registrations. Registrations will automatically be confirmed upon creation.')
registration_ids = fields.One2many('event.registration', 'event_id', string='Attendees')
event_ticket_ids = fields.One2many(
@@ -179,7 +178,7 @@ class EventEvent(models.Model):
# Date fields
date_tz = fields.Selection(
_tz_get, string='Timezone', required=True,
- compute='_compute_date_tz', copy=True, readonly=False, store=True)
+ compute='_compute_date_tz', readonly=False, store=True)
date_begin = fields.Datetime(string='Start Date', required=True, tracking=True)
date_end = fields.Datetime(string='End Date', required=True, tracking=True)
date_begin_located = fields.Char(string='Start Date Located', compute='_compute_date_begin_tz')
diff --git a/addons/event/models/event_registration.py b/addons/event/models/event_registration.py
index c5366c8acc9..3f13a2917c9 100644
--- a/addons/event/models/event_registration.py
+++ b/addons/event/models/event_registration.py
@@ -32,15 +32,15 @@ class EventRegistration(models.Model):
states={'done': [('readonly', True)]})
name = fields.Char(
string='Attendee Name', index=True,
- compute='_compute_contact_info', copy=True, readonly=False, store=True, tracking=10)
- email = fields.Char(string='Email', compute='_compute_contact_info', copy=True, readonly=False, store=True, tracking=11)
- phone = fields.Char(string='Phone', compute='_compute_contact_info', copy=True, readonly=False, store=True, tracking=12)
- mobile = fields.Char(string='Mobile', compute='_compute_contact_info', copy=True, readonly=False, store=True, tracking=13)
+ compute='_compute_contact_info', readonly=False, store=True, tracking=10)
+ email = fields.Char(string='Email', compute='_compute_contact_info', readonly=False, store=True, tracking=11)
+ phone = fields.Char(string='Phone', compute='_compute_contact_info', readonly=False, store=True, tracking=12)
+ mobile = fields.Char(string='Mobile', compute='_compute_contact_info', readonly=False, store=True, tracking=13)
# organization
date_open = fields.Datetime(string='Registration Date', readonly=True, default=lambda self: fields.Datetime.now()) # weird crash is directly now
date_closed = fields.Datetime(
string='Attended Date', compute='_compute_date_closed',
- copy=True, readonly=False, store=True)
+ readonly=False, store=True)
event_begin_date = fields.Datetime(string="Event Start Date", related='event_id.date_begin', readonly=True)
event_end_date = fields.Datetime(string="Event End Date", related='event_id.date_end', readonly=True)
company_id = fields.Many2one(