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][MIG] base_model_restrict_update: Migration to 16.0 #3150

Open
wants to merge 15 commits into
base: 16.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 104 additions & 0 deletions base_model_restrict_update/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
=====================
Update Restrict Model
=====================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:bbcc1b9486884cea6b487847ab39a959539b77ae21276a8362033ed9280e90d8
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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%2Fserver--tools-lightgray.png?logo=github
:target: https://github.com/OCA/server-tools/tree/16.0/base_model_restrict_update
:alt: OCA/server-tools
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-base_model_restrict_update
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/server-tools&target_branch=16.0
:alt: Try me on Runboat

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

This module adds the following features:
* The ability to limit the update permissions for a model to certain groups
* The ability to revoke update permissions for specific users

**Table of contents**

.. contents::
:local:

Configuration
=============

When you want to limit the update permissions of a model to certain groups:

#. Go to *Settings > Techinical > Database Structure > Models*
#. Open the form view of the model, and select 'Update Restrict Model'
#. Assign the groups that should be exempt from the restriction to 'Update-allowed Groups'


When you want revoke update permissions for a specific user:

#. Go to *Settings > Users & Companies > Users*
#. Open the form view of the user, and click the 'Read-only' smart button

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/server-tools/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 <https://github.com/OCA/server-tools/issues/new?body=module:%20base_model_restrict_update%0Aversion:%2016.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
~~~~~~~

* Quartile Limited

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

* `Quartile <https://www.quartile.co>`__:

* Yoshi Tashiro <[email protected]>

* Ecosoft

* Kitti U. <[email protected]>

Other credits
~~~~~~~~~~~~~

* This module borrows the idea from 'Moises Lopez <https://odoo-community.org/groups/contributors-15/contributors-161807>'

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/server-tools <https://github.com/OCA/server-tools/tree/16.0/base_model_restrict_update>`_ 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 base_model_restrict_update/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
13 changes: 13 additions & 0 deletions base_model_restrict_update/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2021-2024 Quartile
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
{
"name": "Update Restrict Model",
"version": "16.0.1.0.0",
"depends": ["base"],
"website": "https://github.com/OCA/server-tools",
"author": "Odoo Community Association (OCA), Quartile Limited",
"category": "Others",
"license": "LGPL-3",
"data": ["views/ir_model_views.xml", "views/res_users_views.xml"],
"installable": True,
}
84 changes: 84 additions & 0 deletions base_model_restrict_update/i18n/base_model_restrict_update.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * base_model_restrict_update
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: base_model_restrict_update
#: model_terms:ir.ui.view,arch_db:base_model_restrict_update.view_users_form
msgid "<span style=\"padding: 0 10px;\">Read-only</span>"
msgstr ""

#. module: base_model_restrict_update
#: model_terms:ir.ui.view,arch_db:base_model_restrict_update.view_users_form
msgid "<span style=\"padding: 0 10px;\">Unrestrict Update</span>"
msgstr ""

#. module: base_model_restrict_update
#: model:ir.model,name:base_model_restrict_update.model_ir_model_access
msgid "Model Access"
msgstr ""

#. module: base_model_restrict_update
#: model:ir.model,name:base_model_restrict_update.model_ir_model
msgid "Models"
msgstr ""

#. module: base_model_restrict_update
#: model:ir.model.fields,field_description:base_model_restrict_update.field_res_users__is_readonly_user
msgid "Ready User"
msgstr ""

#. module: base_model_restrict_update
#: model:ir.model.fields,help:base_model_restrict_update.field_res_users__is_readonly_user
msgid "Set to true and the user are readonly user on all models"
msgstr ""

#. module: base_model_restrict_update
#: model:ir.model.fields,help:base_model_restrict_update.field_res_users__unrestrict_model_update
msgid "Set to true and the user can update restricted model."
msgstr ""

#. module: base_model_restrict_update
#: model:ir.model.fields,field_description:base_model_restrict_update.field_res_users__unrestrict_model_update
msgid "Unrestrict Model Update"
msgstr ""

#. module: base_model_restrict_update
#: model:ir.model.fields,field_description:base_model_restrict_update.field_ir_model__restrict_update
msgid "Update Restrict Model"
msgstr ""

#. module: base_model_restrict_update
#: model:ir.model,name:base_model_restrict_update.model_res_users
msgid "Users"
msgstr ""

#. module: base_model_restrict_update
#: model:ir.model.fields,help:base_model_restrict_update.field_ir_model__restrict_update
msgid ""
"When selected, the model is restricted to read-only unless the user has the "
"special permission."
msgstr ""

#. module: base_model_restrict_update
#: code:addons/base_model_restrict_update/models/ir_model_access.py:0
#, python-format
msgid "You are only allowed to read this record. (%(model)s - %(mode)s)"
msgstr ""

#. module: base_model_restrict_update
#: code:addons/base_model_restrict_update/models/res_users.py:0
#, python-format
msgid "You cannot set admin user as a readonly user."
msgstr ""
83 changes: 83 additions & 0 deletions base_model_restrict_update/i18n/base_model_restrict_update.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * base_model_restrict_update
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.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: base_model_restrict_update
#: model_terms:ir.ui.view,arch_db:base_model_restrict_update.view_users_form
msgid "<span style=\"padding: 0 10px;\">Read-only</span>"
msgstr ""

#. module: base_model_restrict_update
#: model_terms:ir.ui.view,arch_db:base_model_restrict_update.view_users_form
msgid "<span style=\"padding: 0 10px;\">Unrestrict Update</span>"
msgstr ""

#. module: base_model_restrict_update
#: model:ir.model,name:base_model_restrict_update.model_ir_model_access
msgid "Model Access"
msgstr ""

#. module: base_model_restrict_update
#: model:ir.model,name:base_model_restrict_update.model_ir_model
msgid "Models"
msgstr ""

#. module: base_model_restrict_update
#: model:ir.model.fields,field_description:base_model_restrict_update.field_res_users__is_readonly_user
msgid "Ready User"
msgstr ""

#. module: base_model_restrict_update
#: model:ir.model.fields,help:base_model_restrict_update.field_res_users__is_readonly_user
msgid "Set to true and the user are readonly user on all models"
msgstr ""

#. module: base_model_restrict_update
#: model:ir.model.fields,help:base_model_restrict_update.field_res_users__unrestrict_model_update
msgid "Set to true and the user can update restricted model."
msgstr ""

#. module: base_model_restrict_update
#: model:ir.model.fields,field_description:base_model_restrict_update.field_res_users__unrestrict_model_update
msgid "Unrestrict Model Update"
msgstr ""

#. module: base_model_restrict_update
#: model:ir.model.fields,field_description:base_model_restrict_update.field_ir_model__restrict_update
msgid "Update Restrict Model"
msgstr ""

#. module: base_model_restrict_update
#: model:ir.model,name:base_model_restrict_update.model_res_users
msgid "Users"
msgstr ""

#. module: base_model_restrict_update
#: model:ir.model.fields,help:base_model_restrict_update.field_ir_model__restrict_update
msgid ""
"When selected, the model is restricted to read-only unless the user has the "
"special permission."
msgstr ""

#. module: base_model_restrict_update
#: code:addons/base_model_restrict_update/models/ir_model_access.py:0
#, python-format
msgid "You are only allowed to read this record. (%(model)s - %(mode)s)"
msgstr ""

#. module: base_model_restrict_update
#: code:addons/base_model_restrict_update/models/res_users.py:0
#, python-format
msgid "You cannot set admin user as a readonly user."
msgstr ""
95 changes: 95 additions & 0 deletions base_model_restrict_update/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * base_model_restrict_update
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-11-09 19:36+0000\n"
"Last-Translator: Ivorra78 <[email protected]>\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.17\n"

#. module: base_model_restrict_update
#: model_terms:ir.ui.view,arch_db:base_model_restrict_update.view_users_form
msgid "<span style=\"padding: 0 10px;\">Read-only</span>"
msgstr "<span style=\"padding: 0 10px;\">Solo-Lectura</span>"

#. module: base_model_restrict_update
#: model_terms:ir.ui.view,arch_db:base_model_restrict_update.view_users_form
msgid "<span style=\"padding: 0 10px;\">Unrestrict Update</span>"
msgstr ""
"<span style=\"padding: 0 10px;\">Actualización sin restricciones</span>"

#. module: base_model_restrict_update
#: model:ir.model,name:base_model_restrict_update.model_ir_model_access
msgid "Model Access"
msgstr "Acceso Modelo"

#. module: base_model_restrict_update
#: model:ir.model,name:base_model_restrict_update.model_ir_model
msgid "Models"
msgstr "Modelos"

#. module: base_model_restrict_update
#: model:ir.model.fields,field_description:base_model_restrict_update.field_res_users__is_readonly_user
msgid "Ready User"
msgstr "Usuario listo"

#. module: base_model_restrict_update
#: model:ir.model.fields,help:base_model_restrict_update.field_res_users__is_readonly_user
msgid "Set to true and the user are readonly user on all models"
msgstr ""
"Establecer a true y el usuario son de sólo lectura en todos los modelos"

#. module: base_model_restrict_update
#: model:ir.model.fields,help:base_model_restrict_update.field_res_users__unrestrict_model_update
msgid "Set to true and the user can update restricted model."
msgstr ""
"Si se establece en true, el usuario puede actualizar el modelo restringido."

#. module: base_model_restrict_update
#: model:ir.model.fields,field_description:base_model_restrict_update.field_res_users__unrestrict_model_update
msgid "Unrestrict Model Update"
msgstr "Actualización del modelo Sin restricciones"

#. module: base_model_restrict_update
#: model:ir.model.fields,field_description:base_model_restrict_update.field_ir_model__restrict_update
msgid "Update Restrict Model"
msgstr "Actualizar el modelo de restricciones"

#. module: base_model_restrict_update
#: model:ir.model,name:base_model_restrict_update.model_res_users
msgid "Users"
msgstr "Usuarios"

#. module: base_model_restrict_update
#: model:ir.model.fields,help:base_model_restrict_update.field_ir_model__restrict_update
msgid ""
"When selected, the model is restricted to read-only unless the user has the "
"special permission."
msgstr ""
"Cuando se selecciona, el modelo se restringe a sólo lectura a menos que el "
"usuario tenga el permiso especial."

#. module: base_model_restrict_update
#: code:addons/base_model_restrict_update/models/ir_model_access.py:0
#, python-format
msgid "You are only allowed to read this record. (%(model)s - %(mode)s)"
msgstr "Sólo puede leer este registro. (%(model)s - %(mode)s)"

#. module: base_model_restrict_update
#: code:addons/base_model_restrict_update/models/res_users.py:0
#, python-format
msgid "You cannot set admin user as a readonly user."
msgstr "No se puede establecer el usuario admin como usuario de sólo lectura."

#, python-format
#~ msgid "You are only allowed to read this record. ({} - {})"
#~ msgstr "Sólo puede leer este registro. ({} - {})"
Loading
Loading