Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0] cms_info: migrate to v16 #127

Merged
merged 31 commits into from
May 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
5649fbb
Add `cms_info`
simahawk Mar 4, 2018
584020f
Bump cms_info 11.0.1.0.0
simahawk Apr 27, 2018
562593c
cms_info: test coverage 100%
simahawk Aug 5, 2018
0a466bb
cms_info: info dict default to None values
simahawk Aug 9, 2018
7d4a898
Bump cms_info 11.0.1.0.1
simahawk Jan 18, 2019
9333e2e
[ADD] icon.png
OCA-git-bot Apr 3, 2019
589c79d
[FIX] cms_info test. In ir.model.access it is group_id (singular).
NL66278 Aug 8, 2019
62d9e70
cms_info 11.0.1.0.2
OCA-git-bot Aug 21, 2019
d587205
[REF] cms_info: Black python code
simahawk Apr 18, 2020
a87838c
[MIG] cms_info: Migration to 13.0
simahawk Apr 18, 2020
ce702c7
[REF] cms_delete_content: Black python code
simahawk Apr 18, 2020
320e5b9
cms_delete_content depends on cms_info
simahawk Apr 18, 2020
b425b91
cms_info: refactor tests w/ fake model loader
simahawk Apr 19, 2020
603da53
cms_info: apply pre-commit
simahawk Apr 19, 2020
a3e2c2c
cms_info: clean up warnings, unify url makers
simahawk Apr 25, 2020
5c40c6e
cms_info: readme fragment + towncrier changelog
simahawk Apr 26, 2020
2a1f814
[FIX] cms_info: Proper RST syntax
pedrobaeza Nov 9, 2020
80184be
Added translation using Weblate (Spanish)
claudiagn Feb 16, 2021
2bc73c5
Added translation using Weblate (Catalan)
claudiagn Feb 17, 2021
1bda5bd
Translated using Weblate (Spanish)
claudiagn Feb 17, 2021
c7a41e2
Translated using Weblate (Catalan)
claudiagn Feb 17, 2021
03313fd
cms_info: fix tests model load
simahawk May 23, 2021
c24c02d
Set maintainer on cms*
simahawk Aug 23, 2021
e021189
[UPD] changelog
OCA-git-bot Aug 23, 2021
565298a
[UPD] README.rst
OCA-git-bot Aug 23, 2021
71ee26a
cms_info 13.0.1.0.1
OCA-git-bot Aug 23, 2021
1e83b5a
cms_info: migrate to v14
simahawk Aug 23, 2021
b9771b3
[UPD] Update cms_info.pot
oca-travis Aug 25, 2021
ca9f9b0
[UPD] README.rst
OCA-git-bot Aug 25, 2021
d35b4be
cms_info: migrate to v16
simahawk Apr 20, 2023
5d86133
Update test-requirements
simahawk Apr 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
148 changes: 148 additions & 0 deletions cms_info/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
========
CMS info
========

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fwebsite--cms-lightgray.png?logo=github
:target: https://github.com/OCA/website-cms/tree/14.0/cms_info
:alt: OCA/website-cms
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/website-cms-14-0/website-cms-14-0-cms_info
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/225/14.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

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**

.. contents::
:local:

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 <https://github.com/OCA/website-cms/issues/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 <https://github.com/OCA/website-cms/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 <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**>`_.

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

Credits
=======

Authors
~~~~~~~

* Camptocamp

Contributors
~~~~~~~~~~~~

* Simone Orsi <simone.orsi@camptocamp.com>

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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 <https://github.com/OCA/website-cms/tree/14.0/cms_info>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions cms_info/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
17 changes: 17 additions & 0 deletions cms_info/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2018 Simone Orsi - Camptocamp
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).

{
"name": "CMS info",
"summary": """
A set of basic information needed to expose any kind of record in your CMS.
""",
"version": "16.0.1.0.0",
"category": "CMS",
"website": "https://github.com/OCA/website-cms",
"author": "Camptocamp, Odoo Community Association (OCA)",
"mainainers": ["simahawk"],
"license": "LGPL-3",
"installable": True,
"depends": ["base"],
}
58 changes: 58 additions & 0 deletions cms_info/i18n/ca.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * cms_info
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2021-02-17 10:45+0000\n"
"Last-Translator: claudiagn <claudia.gargallo@qubiq.es>\n"
"Language-Team: none\n"
"Language: ca\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.3.2\n"

#. module: cms_info
#: model:ir.model,name:cms_info.model_cms_info_mixin
msgid "CMS Info mixin"
msgstr "CMS Informació mix"

#. module: cms_info
#: model:ir.model.fields,field_description:cms_info.field_cms_info_mixin__cms_delete_url
msgid "CMS delete URL"
msgstr "CMS eliminar URL"

#. module: cms_info
#: model:ir.model.fields,field_description:cms_info.field_cms_info_mixin__cms_delete_confirm_url
msgid "CMS delete confirm URL"
msgstr "CMS confirmar eliminar URL"

#. module: cms_info
#: model:ir.model.fields,field_description:cms_info.field_cms_info_mixin__cms_edit_url
msgid "CMS edit URL"
msgstr "CMS editar URL"

#. module: cms_info
#: model:ir.model.fields,field_description:cms_info.field_cms_info_mixin__display_name
msgid "Display Name"
msgstr "Nom visible"

#. module: cms_info
#: model:ir.model.fields,field_description:cms_info.field_cms_info_mixin__id
msgid "ID"
msgstr "ID"

#. module: cms_info
#: model:ir.model.fields,field_description:cms_info.field_cms_info_mixin____last_update
msgid "Last Modified on"
msgstr "Última modificació el"

#~ msgid "Multi Website Published Mixin"
#~ msgstr "Mixin publicat per diversos llocs web"

#~ msgid "Website Published Mixin"
#~ msgstr "Lloc web Mixin publicat"
49 changes: 49 additions & 0 deletions cms_info/i18n/cms_info.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * cms_info
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: cms_info
#: model:ir.model,name:cms_info.model_cms_info_mixin
msgid "CMS Info mixin"
msgstr ""

#. module: cms_info
#: model:ir.model.fields,field_description:cms_info.field_cms_info_mixin__cms_delete_url
msgid "CMS delete URL"
msgstr ""

#. module: cms_info
#: model:ir.model.fields,field_description:cms_info.field_cms_info_mixin__cms_delete_confirm_url
msgid "CMS delete confirm URL"
msgstr ""

#. module: cms_info
#: model:ir.model.fields,field_description:cms_info.field_cms_info_mixin__cms_edit_url
msgid "CMS edit URL"
msgstr ""

#. module: cms_info
#: model:ir.model.fields,field_description:cms_info.field_cms_info_mixin__display_name
msgid "Display Name"
msgstr ""

#. module: cms_info
#: model:ir.model.fields,field_description:cms_info.field_cms_info_mixin__id
msgid "ID"
msgstr ""

#. module: cms_info
#: model:ir.model.fields,field_description:cms_info.field_cms_info_mixin____last_update
msgid "Last Modified on"
msgstr ""
58 changes: 58 additions & 0 deletions cms_info/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * cms_info
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2021-02-17 10:45+0000\n"
"Last-Translator: claudiagn <claudia.gargallo@qubiq.es>\n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.3.2\n"

#. module: cms_info
#: model:ir.model,name:cms_info.model_cms_info_mixin
msgid "CMS Info mixin"
msgstr "CMS Información mix"

#. module: cms_info
#: model:ir.model.fields,field_description:cms_info.field_cms_info_mixin__cms_delete_url
msgid "CMS delete URL"
msgstr "CMS eliminar URL"

#. module: cms_info
#: model:ir.model.fields,field_description:cms_info.field_cms_info_mixin__cms_delete_confirm_url
msgid "CMS delete confirm URL"
msgstr "CMS confirmar eliminar URL"

#. module: cms_info
#: model:ir.model.fields,field_description:cms_info.field_cms_info_mixin__cms_edit_url
msgid "CMS edit URL"
msgstr "CMS editar URL"

#. module: cms_info
#: model:ir.model.fields,field_description:cms_info.field_cms_info_mixin__display_name
msgid "Display Name"
msgstr "Nombre visible"

#. module: cms_info
#: model:ir.model.fields,field_description:cms_info.field_cms_info_mixin__id
msgid "ID"
msgstr "ID"

#. module: cms_info
#: model:ir.model.fields,field_description:cms_info.field_cms_info_mixin____last_update
msgid "Last Modified on"
msgstr "Última modificación el"

#~ msgid "Multi Website Published Mixin"
#~ msgstr "Mixin publicado per varias webs"

#~ msgid "Website Published Mixin"
#~ msgstr "Web Mixin publicado"
1 change: 1 addition & 0 deletions cms_info/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import cms_mixin