v 14.0 Third Party 161
Download for v 14.0 Deploy on Odoo.sh
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 92
Technical Name cms_info
LicenseLGPL-3
Websitehttps://github.com/OCA/website-cms
Versions 16.0 13.0 10.0 11.0 14.0
You bought this module and need support? Click here!

CMS info

Beta License: LGPL-3 OCA/website-cms Translate me on Weblate Try me on Runboat

Provide basic information for website records / models via website.published.mixin. This module is meant to be used as a base to build your own CMS.

Table of contents

Usage

New attributes

  • cms_create_url: lead to create view. By default /cms/create/my.model
  • cms_search_url: lead to search view. By default /cms/search/my.model
  • cms_edit_url (computed field): lead to edit view. By default /cms/edit/my.model/model_id

Note

No routing provided. This attributes provide only basic information on contents’ URLs. If you use cms_form default routes are handled automatically. If not, is up to you to provide your own routes to handle them.

Permission and extra information

  • record.cms_is_owner(): current user is the owner of the record?
  • record.cms_can_edit(): current user can edit this record?
  • record.cms_can_publish(): current user can publish this record?
  • record.cms_can_delete(): current user can delete this record?
  • model.cms_can_create(): current user can create a new record?

Info all in one

When you build CMS UIs you need all those info at once. This module provides also an helper method cms_info() that gives you back a dictionary containing:

  • is_owner: True/False,
  • can_edit: True/False,
  • can_create: True/False,
  • can_publish: True/False,
  • can_delete: True/False,
  • create_url
  • edit_url
  • delete_url

Known issues / Roadmap

Get rid of website dependency and move website.published.mixin integration to a glue module.

Changelog

13.0.1.0.1 (2021-08-23) Features

  • Migration to v13 (#111)

11.0.1.0.1 (2019-01-18)

Fixes

  • Info dict default to None values
  • Test coverage 100%

11.0.1.0.0 (2018-04-27)

Improvements

  • Initial release

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 to smash it by providing a detailed and welcomed feedback.

Do not contact contributors directly about support or help with technical issues.

Credits

Authors

  • Camptocamp

Maintainers

This module is maintained by the OCA.

Odoo Community Association

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.

This module is part of the OCA/website-cms project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.