Author: |
Camptocamp, Odoo Community Association (OCA) |
License: |
LGPL-3 |
Branch: |
14.0 |
Repository: |
OCA/website-cms |
Dependencies: |
base |
Languages: |
HTML (414, 49.9%),
PO File (54, 6.5%),
Python (245, 29.5%),
and
reStructuredText (117, 14.1%) |
Other branches: |
10.0,
11.0,
and
13.0 |
Other repositories: |
Change2improve/website-cms,
CompassionCH/website-cms,
ERPLibre/website-cms,
ForgeFlow/website-cms,
Gabinete-Digital/website-cms,
Guobower/website-cms,
Ingeos/website-cms,
JazziMc/website-cms,
MjAbuz/website-cms,
NL66278/website-cms,
NeatNerdPrime/website-cms,
Nooka10/website-cms,
PCatinean/website-cms,
TelmoSenseFly/website-cms,
VisiionSolucionesTecnologicas/website-cms,
akretion/website-cms,
anhvu-sg/website-cms,
bishalgit/website-cms,
camptocamp/website-cms,
gfcapalbo/website-cms,
grindtildeath/website-cms,
hbrunn/website-cms,
hinfo506/website-cms,
isoscl/website-cms,
josueBulle/website-cms,
lideritjnma/website-cms,
lukehuang/website-cms,
one2pret/website-cms,
pscloud/website-cms,
ravishekharco/website-cms,
redcor/website-cms,
sanube/website-cms,
simahawk/website-cms,
steingabelgaard/website-cms,
wahello/website-cms,
and
x0rzkov/odoo-website-cms |
<h1 class="title">CMS info</h1>
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/website-cms/tree/14.0/cms_info"><img alt="OCA/website-cms" src="https://img.shields.io/badge/github-OCA%2Fwebsite--cms-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/website-cms-14-0/website-cms-14-0-cms_info"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/225/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>Provide basic information for website records / models via <cite>website.published.mixin</cite>.
This module is meant to be used as a base to build your own CMS.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#usage" id="id4">Usage</a><ul>
<li><a class="reference internal" href="#new-attributes" id="id5">New attributes</a></li>
<li><a class="reference internal" href="#permission-and-extra-information" id="id6">Permission and extra information</a></li>
<li><a class="reference internal" href="#info-all-in-one" id="id7">Info all in one</a></li>
</ul>
</li>
<li><a class="reference internal" href="#known-issues-roadmap" id="id8">Known issues / Roadmap</a></li>
<li><a class="reference internal" href="#changelog" id="id9">Changelog</a><ul>
<li><a class="reference internal" href="#id2" id="id10">11.0.1.0.1 (2019-01-18)</a></li>
<li><a class="reference internal" href="#id3" id="id11">11.0.1.0.0 (2018-04-27)</a></li>
</ul>
</li>
<li><a class="reference internal" href="#bug-tracker" id="id12">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="id13">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="id14">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="id15">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="id16">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<a name="usage"></a>
<h2><a class="toc-backref" href="#id4">Usage</a></h2>
<a name="new-attributes"></a>
<h3><a class="toc-backref" href="#id5">New attributes</a></h3>
<ul class="simple">
<li><code>cms_create_url</code>: lead to create view. By default <code>/cms/create/my.model</code></li>
<li><code>cms_search_url</code>: lead to search view. By default <code>/cms/search/my.model</code></li>
<li><code>cms_edit_url</code> (computed field): lead to edit view. By default <code>/cms/edit/my.model/model_id</code></li>
</ul>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">No routing provided.
This attributes provide only basic information on contents' URLs.
If you use <cite>cms_form</cite> default routes are handled automatically.
If not, is up to you to provide your own routes to handle them.</p>
</div>
<a name="permission-and-extra-information"></a>
<h3><a class="toc-backref" href="#id6">Permission and extra information</a></h3>
<ul class="simple">
<li><code>record.cms_is_owner()</code>: current user is the owner of the record?</li>
<li><code>record.cms_can_edit()</code>: current user can edit this record?</li>
<li><code>record.cms_can_publish()</code>: current user can publish this record?</li>
<li><code>record.cms_can_delete()</code>: current user can delete this record?</li>
<li><code>model.cms_can_create()</code>: current user can create a new record?</li>
</ul>
<a name="info-all-in-one"></a>
<h3><a class="toc-backref" href="#id7">Info all in one</a></h3>
<p>When you build CMS UIs you need all those info at once.
This module provides also an helper method <cite>cms_info()</cite>
that gives you back a dictionary containing:</p>
<ul class="simple">
<li><cite>is_owner</cite>: True/False,</li>
<li><cite>can_edit</cite>: True/False,</li>
<li><cite>can_create</cite>: True/False,</li>
<li><cite>can_publish</cite>: True/False,</li>
<li><cite>can_delete</cite>: True/False,</li>
<li><cite>create_url</cite></li>
<li><cite>edit_url</cite></li>
<li><cite>delete_url</cite></li>
</ul>
<a name="known-issues-roadmap"></a>
<h2><a class="toc-backref" href="#id8">Known issues / Roadmap</a></h2>
<p>Get rid of <cite>website</cite> dependency and move <cite>website.published.mixin</cite> integration
to a glue module.</p>
<a name="changelog"></a>
<h2><a class="toc-backref" href="#id9">Changelog</a></h2>
<p>13.0.1.0.1 (2021-08-23)
<strong>Features</strong></p>
<ul class="simple">
<li>Migration to v13 (<a class="reference external" href="https://github.com/OCA/website-cms/issues/111">#111</a>)</li>
</ul>
<a name="id2"></a>
<h3><a class="toc-backref" href="#id10">11.0.1.0.1 (2019-01-18)</a></h3>
<p><strong>Fixes</strong></p>
<ul class="simple">
<li>Info dict default to None values</li>
<li>Test coverage 100%</li>
</ul>
<a name="id3"></a>
<h3><a class="toc-backref" href="#id11">11.0.1.0.0 (2018-04-27)</a></h3>
<p><strong>Improvements</strong></p>
<ul class="simple">
<li>Initial release</li>
</ul>
<a name="bug-tracker"></a>
<h2><a class="toc-backref" href="#id12">Bug Tracker</a></h2>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/website-cms/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/website-cms/issues/new?body=module:%20cms_info%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
<a name="credits"></a>
<h2><a class="toc-backref" href="#id13">Credits</a></h2>
<a name="authors"></a>
<h3><a class="toc-backref" href="#id14">Authors</a></h3>
<ul class="simple">
<li>Camptocamp</li>
</ul>
<a name="contributors"></a>
<h3><a class="toc-backref" href="#id15">Contributors</a></h3>
<ul class="simple">
<li>Simone Orsi <<a class="reference external" href="mailto:simone.orsi@camptocamp.com">simone.orsi@camptocamp.com</a>></li>
</ul>
<a name="maintainers"></a>
<h3><a class="toc-backref" href="#id16">Maintainers</a></h3>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<p>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.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/website-cms/tree/14.0/cms_info">OCA/website-cms</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
Dependency Graph