[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
This commit is contained in:
@@ -360,6 +360,12 @@ msgstr ""
|
||||
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."
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user