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 #3134

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
9b77d34
[12.0][ADD] base_model_restrict_update
Feb 5, 2021
4d5e612
[UPD] Update base_model_restrict_update.pot
oca-travis Apr 30, 2021
e7538e3
[ADD] icon.png
OCA-git-bot Apr 30, 2021
4336942
[IMP] base_model_restrict_update: black, isort, prettier
kittiu Sep 5, 2021
9503678
[14.0][MIG] base_model_restrict_update
kittiu Sep 5, 2021
a3e1166
[ENH] Add option 'Readonly User' to all models
kittiu Sep 5, 2021
6f558b3
[UPD] Update base_model_restrict_update.pot
oca-travis Dec 2, 2021
df06107
[UPD] README.rst
OCA-git-bot Dec 2, 2021
965baab
[IMP] update dotfiles
OCA-git-bot Mar 30, 2022
db309bd
Added translation using Weblate (Spanish (Argentina))
ibuioli Sep 4, 2022
e96389d
Translated using Weblate (Spanish (Argentina))
ibuioli Sep 4, 2022
a00441e
[MIG] base_model_restrict_update: Migration to 15.0
Saran440 May 11, 2023
8cf0522
[FIX] base_model_restrict_update: button presentation
yostashiro May 20, 2023
6843fff
[UPD] Update base_model_restrict_update.pot
Jun 26, 2023
a4c9e34
[UPD] README.rst
OCA-git-bot Jun 26, 2023
b9f8e1a
[UPD] README.rst
OCA-git-bot Sep 3, 2023
1b5d280
Update translation files
weblate Oct 9, 2023
59fd0ec
Added translation using Weblate (Spanish)
Ivorra78 Oct 11, 2023
180398d
Translated using Weblate (Spanish)
Ivorra78 Oct 11, 2023
10cfe13
[FIX] base_model_restrict_update: Fix lint
etobella Oct 28, 2023
6e2ad53
[UPD] Update base_model_restrict_update.pot
Oct 28, 2023
9079c05
[BOT] post-merge updates
OCA-git-bot Oct 29, 2023
9971758
Translated using Weblate (Spanish (Argentina))
ibuioli Oct 27, 2023
97b5a38
Update translation files
weblate Oct 29, 2023
1b0c83d
Translated using Weblate (Spanish (Argentina))
ibuioli Oct 29, 2023
bf6e236
Translated using Weblate (Spanish)
Ivorra78 Nov 9, 2023
4ee7108
[IMP] base_model_restrict_update: pre-commit stuff
AungKoKoLin1997 Nov 29, 2024
00995a8
[MIG] base_model_restrict_update: Migration to 16.0
AungKoKoLin1997 Nov 29, 2024
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
98 changes: 98 additions & 0 deletions base_model_restrict_update/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
=====================
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 a config to apply a global update restriction to specific model,
while only certain users can update the records if the config is enabled.

**Table of contents**

.. contents::
:local:

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

Enable the "Update Restrict Model" of specific model to restrict update from unpermitted users.
To set a user as a permitted user to update restricted model(s), click on "Unrestrict
Update" toggle button in the user form.

Optionally, to set a user as read-only user to all models, click on "Read-only" toggle
button in the user form.

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 Limited

* 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 Quartile Limited
# License LGPL-3.0 or later (http://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