[FIX] website_event: do not copy menu_id
When the user duplicates an event, the `menu_id` is copied. This causes two issues. First, it links the event to the wrong menu. Then, the controller `event` uses this `menu_id` to compute the target URL. It will therefore redirect the user to the wrong event page. opw-670353
This commit is contained in:
@@ -36,7 +36,7 @@ class event(models.Model):
|
||||
show_menu = fields.Boolean('Dedicated Menu', compute='_get_show_menu', inverse='_set_show_menu',
|
||||
help="Creates menus Introduction, Location and Register on the page "
|
||||
" of the event on the website.", store=True)
|
||||
menu_id = fields.Many2one('website.menu', 'Event Menu')
|
||||
menu_id = fields.Many2one('website.menu', 'Event Menu', copy=False)
|
||||
|
||||
@api.one
|
||||
def _get_new_menu_pages(self):
|
||||
|
||||
Reference in New Issue
Block a user