Skip to content
Snippets Groups Projects
Commit 26dee545 authored by Romain Derie's avatar Romain Derie
Browse files

[FIX] website: unset menu/page m2o if menu url is a controller


Setting a controller URL to a menu which is linked to a page should unset the
m2o relationship to preserve the page URL.

Step to reproduce:
  - Create a page (with a menu) and save, eg: "My Page" (url will be /my-page)
  - Edit that new menu and change the URL to /shop (or any controller)

Issue:
  - The page URL is now /shop, which doesn't have a lot sense if there is a
    controller for that URL.
  - Unpublishing the website.page will unpublish the menu, as a menu needs its
    page to be published in order to be visible.

Note: The flow introduced here is the same as if you choose an URL of an
      already existing page, the menu's page will be unlinked from the menu and
      left with its original URL.

task-2575974

closes odoo/odoo#74163

X-original-commit: b52a01f7
Signed-off-by: default avatarJérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: default avatarRomain Derie <rdeodoo@users.noreply.github.com>
parent 9dcaa4cc
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment