8000 [16.0][MIG] base_model_restrict_update: Migration to 16.0 by nobuQuartile · Pull Request #3150 · OCA/server-tools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[16.0][MIG] base_model_restrict_update: Migration to 16.0 #3150

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

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
108 changes: 108 additions & 0 deletions base_model_restrict_update/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
=====================
Update Restrict Model
=====================

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

.. |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 user's form view and click the **Read-only** smart button
#. In case you wish to exclude some models from being read-only, go to *Settings >
General Settings* and update **Excluded Models from Read-only** under the Permissions
section by listing the models separated by commas (e.g., `sale.order,sale.order.line`).

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

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

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

* Yoshi Tashiro <tashiro@quartile.co>

* Ecosoft

* Kitti U. <kittiu@ecosoft.co.th>

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
18 changes: 18 additions & 0 deletions base_model_restrict_update/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 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_setup"],
"website": "https://github.com/OCA/server-tools",
"author": "Odoo Community Association (OCA), Quartile",
"category": "Others",
"license": "LGPL-3",
"data": [
"data/config_parameter_data.xml",
"views/ir_model_views.xml",
"views/res_config_settings.xml",
"views/res_users_views.xml",
],
"installable": True,
}
9 changes: 9 additions & 0 deletions base_model_restrict_update/data/config_parameter_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<record id="excluded_models_from_readonly" model="ir.config_parameter">
<field
name="key"
>base_model_restrict_update.excluded_models_from_readonly</field>
<field name="value">bus.presence</field>
</record>
</odoo>
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 <informatica@totmaterial.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.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. ({} - {})"
110 changes: 110 additions & 0 deletions base_model_restrict_update/i18n/es_AR.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * base_model_restrict_update
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-10-29 23:45+0000\n"
"Last-Translator: Ignacio Buioli <ibuioli@gmail.com>\n"
"Language-Team: none\n"
"Language: es_AR\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 Irrestricta</span>"

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

#. 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 ""
"Establezcalo como verdadero y el usuario es un usuario de solo 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 ""
"Establezcalo como verdadero y bel usuario podrá 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 Modelo Restricto"

#. 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 está seleccionado, el modelo está restringido a solo lectura a menos "
"que el usuario tenga permisos especiales."

#. 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 "Está permitido solo a 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 puede configurar al usuario administrador como un usuario de sólo lectura."

#, python-format
#~ msgid "You are only allowed to read this record. ({} - {})"
#~ msgstr "Solo le está permitido leer este registro. ({} - {})"

#~ msgid "Display Name"
#~ msgstr "Mostrar Nombre"

#~ msgid "ID"
#~ msgstr "ID"

#~ msgid "Last Modified on"
#~ msgstr "Última modificación en"

#, python-format
#~ msgid "You are only allowed to read this record. (%s - %s)"
#~ msgstr "No está permitido para leer este registro. (%s - %s)"
Loading
0