summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorGoffin Simon <sig@odoo.com>2018-01-08 13:33:19 +0100
committerGoffin Simon <sig@odoo.com>2018-01-09 09:59:09 +0100
commitfe0fc9eef4a960fe93ccc87dfbe56d109edf65b7 (patch)
treeb23394dc510aace54d2ef60a7ed7bf0d2a91e048 /addons
parenta650f2359b7970ae130d266a5b5b60d6062b517a (diff)
[FIX] event: Duplicate an event and try to publish it leads to the previous event webpage
- Steps to reproduce the bug: Go to events ->Duplicate an existing published event Try to publish that new event - Bug: You get redirected to the previous event webpage, which is already published. Unable to publish the event from that page. The url used to access the event is computed the function _compute_website_url which a slugify of the display_name of the event. opw:804118
Diffstat (limited to 'addons')
-rw-r--r--addons/event/i18n/event.pot6
-rw-r--r--addons/event/models/event.py6
2 files changed, 12 insertions, 0 deletions
diff --git a/addons/event/i18n/event.pot b/addons/event/i18n/event.pot
index e93a61e640a..e39d92c7163 100644
--- a/addons/event/i18n/event.pot
+++ b/addons/event/i18n/event.pot
@@ -361,6 +361,12 @@ msgid "${object.event_id.name}: ${object.get_date_range_str()}"
msgstr ""
#. module: event
+#: code:addons/event/models/event.py:297
+#, python-format
+msgid "%s (copy)"
+msgstr ""
+
+#. module: event
#: model:event.event,description:event.event_0
msgid "1 business room: to discuss implementation methodologies, best sales practices, etc."
msgstr ""
diff --git a/addons/event/models/event.py b/addons/event/models/event.py
index 716e0f4b1c6..825006e9933 100644
--- a/addons/event/models/event.py
+++ b/addons/event/models/event.py
@@ -291,6 +291,12 @@ class EventEvent(models.Model):
self.message_subscribe([vals['organizer_id']])
return res
+ @api.multi
+ def copy(self, default=None):
+ self.ensure_one()
+ default = dict(default or {}, name=_("%s (copy)") % (self.name))
+ return super(EventEvent, self).copy(default)
+
@api.one
def button_draft(self):
self.state = 'draft'