CMS delete content

Basic features for handling content deletion via frontend.

Technical Name:
cms_delete_content
License:
Author:
Camptocamp
Website:
  • Odoo Version

CMS delete content

Basic features for deleting content via frontend.

Features

  • register your own custom delete confirmation view per-model
  • use cms_status_message to show confirmation message for deletion
  • generic template for asking delete confirmation
  • new fields and parameters on website.published.mixin to handle delete links and redirects

Usage

Delete button and behavior

To add a delete button:

When you click on a confirmation dialog pops up.

If you hit cancel the popup is closed. If you hit submit the item is deleted and you get redirected to your model's cms_after_delete_url. By default is /.

Customization

Custom per-model delete messge

Custom "after delete URL"

When you are viewing a content and you delete it you want to be redirected to some other place.

By default you get redirected to the root of the website.

To change this behavior just override the attribute in your model declaration:

Note: if you want to customize it on demand for particular pages, or you are deleting an item from another page (like a management page) you can pass ?redirect= in the url, like:

Custom global delete confirm message appeareance

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback.

Credits

Contributors

Maintainer

Odoo Community Association

This module is maintained by the OCA.

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

To contribute to this module, please visit https://odoo-community.org.

This is a preview of the recently viewed products by the user.
Once the user has seen at least one product this snippet will be visible.

Recently viewed Products