diff --git a/base_technical_user/README.rst b/base_technical_user/README.rst index 09c2705ca..f8e0b875a 100644 --- a/base_technical_user/README.rst +++ b/base_technical_user/README.rst @@ -17,24 +17,23 @@ Base Technical User :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-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_technical_user + :target: https://github.com/OCA/server-tools/tree/17.0/base_technical_user :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_technical_user + :target: https://translation.odoo-community.org/projects/server-tools-17-0/server-tools-17-0-base_technical_user :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 + :target: https://runboat.odoo-community.org/builds?repo=OCA/server-tools&target_branch=17.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| -This module extends the functionality of company management. -It allows you to bind a technical user on the company in order to use it in -batch processes. +This module extends the functionality of company management. It allows +you to bind a technical user on the company in order to use it in batch +processes. -The technical user must -- be inactive to avoid login -- be in the required groups depending of what you need to do +The technical user must - be inactive to avoid login - be in the +required groups depending of what you need to do **Table of contents** @@ -44,23 +43,24 @@ The technical user must Usage ===== -If you install the module, you will find a tab on the company form allowing -to define the technical user. +If you install the module, you will find a tab on the company form +allowing to define the technical user. In your code you can use the following helper that will return you -- a self with the user tech if configured -- or a self with sudo user +- a self with the user tech if configured +- or a self with sudo user -.. code-block:: python +.. code:: python - self_tech = self.sudo_tech() + self_tech = self.sudo_tech() -If you want to raise an error if the tech user in not configured just call it with +If you want to raise an error if the tech user in not configured just +call it with -.. code-block:: python +.. code:: python - self_tech = self.sudo_tech(raise_if_missing) + self_tech = self.sudo_tech(raise_if_missing) Bug Tracker =========== @@ -68,7 +68,7 @@ Bug Tracker Bugs are tracked on `GitHub 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -76,17 +76,17 @@ Credits ======= Authors -~~~~~~~ +------- * ACSONE SA/NV Contributors -~~~~~~~~~~~~ +------------ -* Cédric Pigeon +- Cédric Pigeon Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. @@ -98,6 +98,6 @@ 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 `_ project on GitHub. +This module is part of the `OCA/server-tools `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/base_technical_user/pyproject.toml b/base_technical_user/pyproject.toml new file mode 100644 index 000000000..4231d0ccc --- /dev/null +++ b/base_technical_user/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/base_technical_user/readme/CONTRIBUTORS.md b/base_technical_user/readme/CONTRIBUTORS.md new file mode 100644 index 000000000..0ed9dc1a4 --- /dev/null +++ b/base_technical_user/readme/CONTRIBUTORS.md @@ -0,0 +1 @@ +- Cédric Pigeon \<\> diff --git a/base_technical_user/readme/CONTRIBUTORS.rst b/base_technical_user/readme/CONTRIBUTORS.rst deleted file mode 100644 index 4771f8432..000000000 --- a/base_technical_user/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1 +0,0 @@ -* Cédric Pigeon diff --git a/base_technical_user/readme/DESCRIPTION.md b/base_technical_user/readme/DESCRIPTION.md new file mode 100644 index 000000000..b320a1967 --- /dev/null +++ b/base_technical_user/readme/DESCRIPTION.md @@ -0,0 +1,6 @@ +This module extends the functionality of company management. It allows +you to bind a technical user on the company in order to use it in batch +processes. + +The technical user must - be inactive to avoid login - be in the +required groups depending of what you need to do diff --git a/base_technical_user/readme/DESCRIPTION.rst b/base_technical_user/readme/DESCRIPTION.rst deleted file mode 100644 index 406ecba9c..000000000 --- a/base_technical_user/readme/DESCRIPTION.rst +++ /dev/null @@ -1,7 +0,0 @@ -This module extends the functionality of company management. -It allows you to bind a technical user on the company in order to use it in -batch processes. - -The technical user must -- be inactive to avoid login -- be in the required groups depending of what you need to do diff --git a/base_technical_user/readme/USAGE.rst b/base_technical_user/readme/USAGE.md similarity index 58% rename from base_technical_user/readme/USAGE.rst rename to base_technical_user/readme/USAGE.md index 9441e914b..6be4945fc 100644 --- a/base_technical_user/readme/USAGE.rst +++ b/base_technical_user/readme/USAGE.md @@ -1,17 +1,18 @@ -If you install the module, you will find a tab on the company form allowing -to define the technical user. +If you install the module, you will find a tab on the company form +allowing to define the technical user. In your code you can use the following helper that will return you - a self with the user tech if configured - or a self with sudo user -.. code-block:: python +``` python +self_tech = self.sudo_tech() +``` - self_tech = self.sudo_tech() +If you want to raise an error if the tech user in not configured just +call it with -If you want to raise an error if the tech user in not configured just call it with - -.. code-block:: python - - self_tech = self.sudo_tech(raise_if_missing) +``` python +self_tech = self.sudo_tech(raise_if_missing) +``` diff --git a/base_technical_user/static/description/index.html b/base_technical_user/static/description/index.html index 12008bb4e..54705bea4 100644 --- a/base_technical_user/static/description/index.html +++ b/base_technical_user/static/description/index.html @@ -369,13 +369,12 @@ ul.auto-toc { !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:099eb071622953ab64fab1fa82cdb808104319009ed7e981e72b55f3dcda994d !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/server-tools Translate me on Weblate Try me on Runboat

-

This module extends the functionality of company management. -It allows you to bind a technical user on the company in order to use it in -batch processes.

-

The technical user must -- be inactive to avoid login -- be in the required groups depending of what you need to do

+

Beta License: AGPL-3 OCA/server-tools Translate me on Weblate Try me on Runboat

+

This module extends the functionality of company management. It allows +you to bind a technical user on the company in order to use it in batch +processes.

+

The technical user must - be inactive to avoid login - be in the +required groups depending of what you need to do

Table of contents

    @@ -391,8 +390,8 @@ batch processes.

Usage

-

If you install the module, you will find a tab on the company form allowing -to define the technical user.

+

If you install the module, you will find a tab on the company form +allowing to define the technical user.

In your code you can use the following helper that will return you

  • a self with the user tech if configured
  • @@ -401,7 +400,8 @@ to define the technical user.

     self_tech = self.sudo_tech()
     
    -

    If you want to raise an error if the tech user in not configured just call it with

    +

    If you want to raise an error if the tech user in not configured just +call it with

     self_tech = self.sudo_tech(raise_if_missing)
     
    @@ -411,7 +411,7 @@ to define the technical user.

    Bugs are tracked on GitHub 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.

    +feedback.

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

@@ -435,7 +435,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome

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 project on GitHub.

+

This module is part of the OCA/server-tools project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

diff --git a/base_technical_user/tests/test_sudo_tech.py b/base_technical_user/tests/test_sudo_tech.py index 4ab1b8ee1..ddbc2d22d 100644 --- a/base_technical_user/tests/test_sudo_tech.py +++ b/base_technical_user/tests/test_sudo_tech.py @@ -11,7 +11,7 @@ from odoo.tests import TransactionCase class SudoTechCase(TransactionCase): @classmethod def setUpClass(cls): - super(SudoTechCase, cls).setUpClass() + super().setUpClass() cls.user_tech = ( cls.env["res.users"] .with_context(tracking_disable=True, no_reset_password=True)