[FIX] website: remove duplicate action in page list view

Before this commit and since commit [1], it was possible to clone a page
in the page list view.
It shouldn't be the case, cloning a page lead to bad result: a page
with the same URL which is not shown in the page list view because pages
are filtered by URL to remove duplicates.

Cloning a page has always had to be done through the page properties >
"clone page" button. Doing it this way will ask the user for a new page
name (and so a new url). The page will then correctly be listed.

[1]: https://github.com/odoo/odoo/commit/3192051806e0da1276604a31ad818f8768105362

opw-3591738

closes odoo/odoo#146173

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
Romain Derie
2023-12-15 01:35:57 +00:00
parent 35d5b96d05
commit f57b92a8de
@@ -56,6 +56,9 @@ export class PageListController extends PageControllerMixin(listView.Controller)
callback: async () => this.togglePublished(false),
};
}
if (this.props.resModel === "website.page") {
menuItems.duplicate.isAvailable = () => false;
}
return menuItems;
}