summaryrefslogtreecommitdiff
path: root/addons/website_event_questions/models
diff options
context:
space:
mode:
authorjpr-odoo <jpr@openerp.com>2016-05-23 17:12:23 +0530
committerYannick Tivisse <yti@odoo.com>2016-06-02 12:52:36 +0200
commit98a3482369a02bdc550d05c250f05c82450cd2a3 (patch)
tree449f0de794f1b0a4aa5215cb8cafc1d5f5d44ff6 /addons/website_event_questions/models
parentccb907a185b3cb21220949f8336702db2f416496 (diff)
[IMP] event,website_event_question: Copy more fields on duplicate
In the Event App, when we duplicating an event, the email schedule and Questions also duplicate.
Diffstat (limited to 'addons/website_event_questions/models')
-rw-r--r--addons/website_event_questions/models/event.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/website_event_questions/models/event.py b/addons/website_event_questions/models/event.py
index 77cdf75ada4..41cb2900585 100644
--- a/addons/website_event_questions/models/event.py
+++ b/addons/website_event_questions/models/event.py
@@ -7,7 +7,7 @@ class EventEvent(models.Model):
""" Override Event model to add optional questions when buying tickets. """
_inherit = 'event.event'
- question_ids = fields.One2many('event.question', 'event_id', 'Questions')
+ question_ids = fields.One2many('event.question', 'event_id', 'Questions', copy=True)
general_question_ids = fields.One2many('event.question', 'event_id', 'Questions',
domain=[('is_individual', '=', False)])
specific_question_ids = fields.One2many('event.question', 'event_id', 'Questions',
@@ -41,7 +41,7 @@ class EventQuestion(models.Model):
title = fields.Char(required=True, translate=True)
event_id = fields.Many2one('event.event', required=True, ondelete='cascade')
- answer_ids = fields.One2many('event.answer', 'question_id', "Answers", required=True)
+ answer_ids = fields.One2many('event.answer', 'question_id', "Answers", required=True, copy=True)
sequence = fields.Integer(default=10)
is_individual = fields.Boolean('Ask each attendee',
help="If True, this question will be asked for every attendee of a reservation. If "