From ef43b4dc6c49eb1ef4301061fe5a6d2f8ec1f691 Mon Sep 17 00:00:00 2001 From: Antoni Marroig Campomar Date: Fri, 17 May 2024 17:05:15 +0200 Subject: [PATCH] [IMP] sign_oca: pre-commit auto fixes --- sign_oca/README.rst | 138 +++++++++--------- sign_oca/models/sign_oca_request.py | 7 +- sign_oca/models/sign_oca_role.py | 3 +- sign_oca/models/sign_oca_template.py | 4 +- sign_oca/pyproject.toml | 3 + sign_oca/readme/CONFIGURE.md | 5 + sign_oca/readme/CONFIGURE.rst | 4 - sign_oca/readme/CONTRIBUTORS.md | 3 + sign_oca/readme/CONTRIBUTORS.rst | 6 - .../{DESCRIPTION.rst => DESCRIPTION.md} | 3 +- sign_oca/readme/ROADMAP.md | 5 + sign_oca/readme/ROADMAP.rst | 6 - sign_oca/readme/USAGE.md | 57 ++++++++ sign_oca/readme/USAGE.rst | 55 ------- sign_oca/static/description/index.html | 68 +++++---- sign_oca/tests/test_sign.py | 5 +- sign_oca/tests/test_sign_portal.py | 6 +- .../wizards/sign_oca_template_generate.py | 1 - 18 files changed, 195 insertions(+), 184 deletions(-) create mode 100644 sign_oca/pyproject.toml create mode 100644 sign_oca/readme/CONFIGURE.md delete mode 100644 sign_oca/readme/CONFIGURE.rst create mode 100644 sign_oca/readme/CONTRIBUTORS.md delete mode 100644 sign_oca/readme/CONTRIBUTORS.rst rename sign_oca/readme/{DESCRIPTION.rst => DESCRIPTION.md} (84%) create mode 100644 sign_oca/readme/ROADMAP.md delete mode 100644 sign_oca/readme/ROADMAP.rst create mode 100644 sign_oca/readme/USAGE.md delete mode 100644 sign_oca/readme/USAGE.rst diff --git a/sign_oca/README.rst b/sign_oca/README.rst index 4cd42932..7f95883c 100644 --- a/sign_oca/README.rst +++ b/sign_oca/README.rst @@ -17,18 +17,19 @@ Sign Oca :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsign-lightgray.png?logo=github - :target: https://github.com/OCA/sign/tree/16.0/sign_oca + :target: https://github.com/OCA/sign/tree/17.0/sign_oca :alt: OCA/sign .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/sign-16-0/sign-16-0-sign_oca + :target: https://translation.odoo-community.org/projects/sign-17-0/sign-17-0-sign_oca :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/sign&target_branch=16.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/sign&target_branch=17.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| -This module allows to create documents for signature inside Odoo using OWL. +This module allows to create documents for signature inside Odoo using +OWL. **Table of contents** @@ -38,79 +39,88 @@ This module allows to create documents for signature inside Odoo using OWL. Configuration ============= -There is a wizard (sign.oca.template.generate.multi) that can be used for any model needed. -If there is a template without a linked model or linked to a model (res.partner for example) -an action will be automatically displayed in the tree and form view (only for users -with Sign permissions). +There is a wizard (sign.oca.template.generate.multi) that can be used +for any model needed. If there is a template without a linked model or +linked to a model (res.partner for example) an action will be +automatically displayed in the tree and form view (only for users with +Sign permissions). Usage ===== Creation of templates -~~~~~~~~~~~~~~~~~~~~~ +--------------------- -* Access `Sign / Templates` -* Create a new template -* Add a PDF File -* Access the configuration menu -* You can add a field by doing a right click inside a page -* Click on the field in order to delete or edit some configuration of it -* The template is autosaved +- Access Sign / Templates +- Create a new template +- Add a PDF File +- Access the configuration menu +- You can add a field by doing a right click inside a page +- Click on the field in order to delete or edit some configuration of + it +- The template is autosaved Sign role -~~~~~~~~~~ - -* Access `Sign / Settings / Roles` -* Create a new role (Equipment employee for example) -* You can set the Partner type you need (empty, default or expression). -* With the expression option you can set: ${object.field_name.id} -* If you create a sign request from template signer will be auto-create according to roles +--------- +- Access Sign / Settings / Roles +- Create a new role (Equipment employee for example) +- You can set the Partner type you need (empty, default or expression). +- With the expression option you can set: ${object.field_name.id} +- If you create a sign request from template signer will be auto-create + according to roles Sign a document from template -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -* Access `Sign / Templates` -* Press the `Sign` button from a template -* Fill all the possible partners that will sign the document -* You can link the template to a model (maintenance.equipment for example) -* The signature action will be opened. -* There, you can fill all the data you need. -* Once you finish, press the sign button on the top -* When the last signer signs it, the final file will be generated as a PDF - +----------------------------- + +- Access Sign / Templates +- Press the Sign button from a template +- Fill all the possible partners that will sign the document +- You can link the template to a model (maintenance.equipment for + example) +- The signature action will be opened. +- There, you can fill all the data you need. +- Once you finish, press the sign button on the top +- When the last signer signs it, the final file will be generated as a + PDF Sign a pending document -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- -* Go to the pencil icon in the upper right corner (systray) of the sign request to access the pending signatures. -* Press the `Sign` button from signer request -* The signature action will be opened. -* There, you can fill all the data you need. -* Once you finish, press the sign button on the top -* When the last signer signs it, the final file will be generated as a PDF +- Go to the pencil icon in the upper right corner (systray) of the sign + request to access the pending signatures. +- Press the Sign button from signer request +- The signature action will be opened. +- There, you can fill all the data you need. +- Once you finish, press the sign button on the top +- When the last signer signs it, the final file will be generated as a + PDF Sign from template -~~~~~~~~~~~~~~~~~~ - -* Go to any list view or form view (except sign.oca models), e.g.: Contacts -* Select multiple records (3 for example). -* The "Sign from template" action will be available if there are any sign templates - created that are not linked to any model and/or any linked to the corresponding model. -* Select a template. -* Click on the "Generate" button. -* 3 requests will be created (each linked to each selected record) BUT no signer will be set. -* Some extra modules (e.g. maintenance_sign_oca) will automatically set the signers for each request. +------------------ + +- Go to any list view or form view (except sign.oca models), e.g.: + Contacts +- Select multiple records (3 for example). +- The "Sign from template" action will be available if there are any + sign templates created that are not linked to any model and/or any + linked to the corresponding model. +- Select a template. +- Click on the "Generate" button. +- 3 requests will be created (each linked to each selected record) BUT + no signer will be set. +- Some extra modules (e.g. maintenance_sign_oca) will automatically set + the signers for each request. Known issues / Roadmap ====================== Tasks -~~~~~ +----- -* Ensure that the signature is inalterable. - Maybe we might need to use some tools like endevise or pyHanko with a certificate. - Signer can be authenticated using OTP. +- Ensure that the signature is inalterable. Maybe we might need to use + some tools like endevise or pyHanko with a certificate. Signer can be + authenticated using OTP. Bug Tracker =========== @@ -118,7 +128,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. @@ -126,22 +136,20 @@ Credits ======= Authors -~~~~~~~ +------- * Dixmit Contributors -~~~~~~~~~~~~ - -* Enric Tobella (www.dixmit.com) - +------------ -* `Tecnativa `_: +- Enric Tobella (`www.dixmit.com `__) +- `Tecnativa `__: - * Víctor Martínez + - Víctor Martínez Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. @@ -161,6 +169,6 @@ Current `maintainer `__: |maintainer-etobella| -This module is part of the `OCA/sign `_ project on GitHub. +This module is part of the `OCA/sign `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/sign_oca/models/sign_oca_request.py b/sign_oca/models/sign_oca_request.py index ccfe469f..b6300e6b 100644 --- a/sign_oca/models/sign_oca_request.py +++ b/sign_oca/models/sign_oca_request.py @@ -18,7 +18,6 @@ class SignOcaRequest(models.Model): - _name = "sign.oca.request" _inherit = ["mail.thread", "mail.activity.mixin"] _description = "Sign Request" @@ -302,7 +301,6 @@ def create(self, vals_list): class SignOcaRequestSigner(models.Model): - _name = "sign.oca.request.signer" _inherit = "portal.mixin" _description = "Sign Request Value" @@ -341,10 +339,7 @@ def _compute_is_allow_signature(self): def _compute_access_url(self): result = super()._compute_access_url() for record in self: - record.access_url = "/sign_oca/document/%s/%s" % ( - record.id, - record.access_token, - ) + record.access_url = f"/sign_oca/document/{record.id}/{record.access_token}" return result @api.onchange("role_id") diff --git a/sign_oca/models/sign_oca_role.py b/sign_oca/models/sign_oca_role.py index 0006142d..e161c3f0 100644 --- a/sign_oca/models/sign_oca_role.py +++ b/sign_oca/models/sign_oca_role.py @@ -20,7 +20,8 @@ class SignOcaRole(models.Model): default="empty", help="This field is used to define how the partner" " will be calculated in the different roles of " - "a request. This field will be used when the 'Sign from Template' action is triggered.", + "a request. This field will be used when the " + "'Sign from Template' action is triggered.", ) default_partner_id = fields.Many2one( comodel_name="res.partner", string="Default partner" diff --git a/sign_oca/models/sign_oca_template.py b/sign_oca/models/sign_oca_template.py index 589253fa..7916d3dc 100644 --- a/sign_oca/models/sign_oca_template.py +++ b/sign_oca/models/sign_oca_template.py @@ -5,7 +5,6 @@ class SignOcaTemplate(models.Model): - _name = "sign.oca.template" _description = "Sign Oca Template" # TODO _inherit = ["mail.thread"] @@ -112,7 +111,7 @@ def _prepare_sign_oca_request_vals_from_record(self, record): return { "name": self.name, "template_id": self.id, - "record_ref": "%s,%s" % (record._name, record.id), + "record_ref": f"{record._name},{record.id}", "signatory_data": self._get_signatory_data(), "data": self.data, "signer_ids": [ @@ -130,7 +129,6 @@ def _prepare_sign_oca_request_vals_from_record(self, record): class SignOcaTemplateItem(models.Model): - _name = "sign.oca.template.item" _description = "Sign Oca Template Item" # TODO diff --git a/sign_oca/pyproject.toml b/sign_oca/pyproject.toml new file mode 100644 index 00000000..4231d0cc --- /dev/null +++ b/sign_oca/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/sign_oca/readme/CONFIGURE.md b/sign_oca/readme/CONFIGURE.md new file mode 100644 index 00000000..f06941c2 --- /dev/null +++ b/sign_oca/readme/CONFIGURE.md @@ -0,0 +1,5 @@ +There is a wizard (sign.oca.template.generate.multi) that can be used +for any model needed. If there is a template without a linked model or +linked to a model (res.partner for example) an action will be +automatically displayed in the tree and form view (only for users with +Sign permissions). diff --git a/sign_oca/readme/CONFIGURE.rst b/sign_oca/readme/CONFIGURE.rst deleted file mode 100644 index 7c42a833..00000000 --- a/sign_oca/readme/CONFIGURE.rst +++ /dev/null @@ -1,4 +0,0 @@ -There is a wizard (sign.oca.template.generate.multi) that can be used for any model needed. -If there is a template without a linked model or linked to a model (res.partner for example) -an action will be automatically displayed in the tree and form view (only for users -with Sign permissions). diff --git a/sign_oca/readme/CONTRIBUTORS.md b/sign_oca/readme/CONTRIBUTORS.md new file mode 100644 index 00000000..d4491d4f --- /dev/null +++ b/sign_oca/readme/CONTRIBUTORS.md @@ -0,0 +1,3 @@ +- Enric Tobella (www.dixmit.com) +- [Tecnativa](https://www.tecnativa.com): + - Víctor Martínez diff --git a/sign_oca/readme/CONTRIBUTORS.rst b/sign_oca/readme/CONTRIBUTORS.rst deleted file mode 100644 index f9748b2e..00000000 --- a/sign_oca/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,6 +0,0 @@ -* Enric Tobella (www.dixmit.com) - - -* `Tecnativa `_: - - * Víctor Martínez diff --git a/sign_oca/readme/DESCRIPTION.rst b/sign_oca/readme/DESCRIPTION.md similarity index 84% rename from sign_oca/readme/DESCRIPTION.rst rename to sign_oca/readme/DESCRIPTION.md index e24bf705..aa9a46e0 100644 --- a/sign_oca/readme/DESCRIPTION.rst +++ b/sign_oca/readme/DESCRIPTION.md @@ -1 +1,2 @@ -This module allows to create documents for signature inside Odoo using OWL. +This module allows to create documents for signature inside Odoo using +OWL. diff --git a/sign_oca/readme/ROADMAP.md b/sign_oca/readme/ROADMAP.md new file mode 100644 index 00000000..c4bd097d --- /dev/null +++ b/sign_oca/readme/ROADMAP.md @@ -0,0 +1,5 @@ +## Tasks + +- Ensure that the signature is inalterable. Maybe we might need to use + some tools like endevise or pyHanko with a certificate. Signer can be + authenticated using OTP. diff --git a/sign_oca/readme/ROADMAP.rst b/sign_oca/readme/ROADMAP.rst deleted file mode 100644 index 3391c0b0..00000000 --- a/sign_oca/readme/ROADMAP.rst +++ /dev/null @@ -1,6 +0,0 @@ -Tasks -~~~~~ - -* Ensure that the signature is inalterable. - Maybe we might need to use some tools like endevise or pyHanko with a certificate. - Signer can be authenticated using OTP. diff --git a/sign_oca/readme/USAGE.md b/sign_oca/readme/USAGE.md new file mode 100644 index 00000000..45b3bd53 --- /dev/null +++ b/sign_oca/readme/USAGE.md @@ -0,0 +1,57 @@ +## Creation of templates + +- Access Sign / Templates +- Create a new template +- Add a PDF File +- Access the configuration menu +- You can add a field by doing a right click inside a page +- Click on the field in order to delete or edit some configuration of it +- The template is autosaved + +## Sign role + +- Access Sign / Settings / Roles +- Create a new role (Equipment employee for example) +- You can set the Partner type you need (empty, default or expression). +- With the expression option you can set: \${object.field_name.id} +- If you create a sign request from template signer will be auto-create + according to roles + +## Sign a document from template + +- Access Sign / Templates +- Press the Sign button from a template +- Fill all the possible partners that will sign the document +- You can link the template to a model (maintenance.equipment for + example) +- The signature action will be opened. +- There, you can fill all the data you need. +- Once you finish, press the sign button on the top +- When the last signer signs it, the final file will be generated as a + PDF + +## Sign a pending document + +- Go to the pencil icon in the upper right corner (systray) of the sign + request to access the pending signatures. +- Press the Sign button from signer request +- The signature action will be opened. +- There, you can fill all the data you need. +- Once you finish, press the sign button on the top +- When the last signer signs it, the final file will be generated as a + PDF + +## Sign from template + +- Go to any list view or form view (except sign.oca models), e.g.: + Contacts +- Select multiple records (3 for example). +- The "Sign from template" action will be available if there are any + sign templates created that are not linked to any model and/or any + linked to the corresponding model. +- Select a template. +- Click on the "Generate" button. +- 3 requests will be created (each linked to each selected record) BUT + no signer will be set. +- Some extra modules (e.g. maintenance_sign_oca) will automatically set + the signers for each request. diff --git a/sign_oca/readme/USAGE.rst b/sign_oca/readme/USAGE.rst deleted file mode 100644 index 2bff80d4..00000000 --- a/sign_oca/readme/USAGE.rst +++ /dev/null @@ -1,55 +0,0 @@ -Creation of templates -~~~~~~~~~~~~~~~~~~~~~ - -* Access `Sign / Templates` -* Create a new template -* Add a PDF File -* Access the configuration menu -* You can add a field by doing a right click inside a page -* Click on the field in order to delete or edit some configuration of it -* The template is autosaved - -Sign role -~~~~~~~~~~ - -* Access `Sign / Settings / Roles` -* Create a new role (Equipment employee for example) -* You can set the Partner type you need (empty, default or expression). -* With the expression option you can set: ${object.field_name.id} -* If you create a sign request from template signer will be auto-create according to roles - - -Sign a document from template -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -* Access `Sign / Templates` -* Press the `Sign` button from a template -* Fill all the possible partners that will sign the document -* You can link the template to a model (maintenance.equipment for example) -* The signature action will be opened. -* There, you can fill all the data you need. -* Once you finish, press the sign button on the top -* When the last signer signs it, the final file will be generated as a PDF - - -Sign a pending document -~~~~~~~~~~~~~~~~~~~~~~~ - -* Go to the pencil icon in the upper right corner (systray) of the sign request to access the pending signatures. -* Press the `Sign` button from signer request -* The signature action will be opened. -* There, you can fill all the data you need. -* Once you finish, press the sign button on the top -* When the last signer signs it, the final file will be generated as a PDF - -Sign from template -~~~~~~~~~~~~~~~~~~ - -* Go to any list view or form view (except sign.oca models), e.g.: Contacts -* Select multiple records (3 for example). -* The "Sign from template" action will be available if there are any sign templates - created that are not linked to any model and/or any linked to the corresponding model. -* Select a template. -* Click on the "Generate" button. -* 3 requests will be created (each linked to each selected record) BUT no signer will be set. -* Some extra modules (e.g. maintenance_sign_oca) will automatically set the signers for each request. diff --git a/sign_oca/static/description/index.html b/sign_oca/static/description/index.html index 6bd4795c..ffe9a50c 100644 --- a/sign_oca/static/description/index.html +++ b/sign_oca/static/description/index.html @@ -368,8 +368,9 @@

Sign Oca

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:5da16efc5d54847e2817c4bcab28ffb1dd23cf6a161658aefe5b1acdd0333e12 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

-

This module allows to create documents for signature inside Odoo using OWL.

+

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

+

This module allows to create documents for signature inside Odoo using +OWL.

Table of contents

    @@ -397,70 +398,81 @@

    Sign Oca

Configuration

-

There is a wizard (sign.oca.template.generate.multi) that can be used for any model needed. -If there is a template without a linked model or linked to a model (res.partner for example) -an action will be automatically displayed in the tree and form view (only for users -with Sign permissions).

+

There is a wizard (sign.oca.template.generate.multi) that can be used +for any model needed. If there is a template without a linked model or +linked to a model (res.partner for example) an action will be +automatically displayed in the tree and form view (only for users with +Sign permissions).

Usage

Creation of templates

    -
  • Access Sign / Templates
  • +
  • Access Sign / Templates
  • Create a new template
  • Add a PDF File
  • Access the configuration menu
  • You can add a field by doing a right click inside a page
  • -
  • Click on the field in order to delete or edit some configuration of it
  • +
  • Click on the field in order to delete or edit some configuration of +it
  • The template is autosaved

Sign role

    -
  • Access Sign / Settings / Roles
  • +
  • Access Sign / Settings / Roles
  • Create a new role (Equipment employee for example)
  • You can set the Partner type you need (empty, default or expression).
  • With the expression option you can set: ${object.field_name.id}
  • -
  • If you create a sign request from template signer will be auto-create according to roles
  • +
  • If you create a sign request from template signer will be auto-create +according to roles

Sign a document from template

    -
  • Access Sign / Templates
  • -
  • Press the Sign button from a template
  • +
  • Access Sign / Templates
  • +
  • Press the Sign button from a template
  • Fill all the possible partners that will sign the document
  • -
  • You can link the template to a model (maintenance.equipment for example)
  • +
  • You can link the template to a model (maintenance.equipment for +example)
  • The signature action will be opened.
  • There, you can fill all the data you need.
  • Once you finish, press the sign button on the top
  • -
  • When the last signer signs it, the final file will be generated as a PDF
  • +
  • When the last signer signs it, the final file will be generated as a +PDF

Sign a pending document

    -
  • Go to the pencil icon in the upper right corner (systray) of the sign request to access the pending signatures.
  • -
  • Press the Sign button from signer request
  • +
  • Go to the pencil icon in the upper right corner (systray) of the sign +request to access the pending signatures.
  • +
  • Press the Sign button from signer request
  • The signature action will be opened.
  • There, you can fill all the data you need.
  • Once you finish, press the sign button on the top
  • -
  • When the last signer signs it, the final file will be generated as a PDF
  • +
  • When the last signer signs it, the final file will be generated as a +PDF

Sign from template

    -
  • Go to any list view or form view (except sign.oca models), e.g.: Contacts
  • +
  • Go to any list view or form view (except sign.oca models), e.g.: +Contacts
  • Select multiple records (3 for example).
  • -
  • The “Sign from template” action will be available if there are any sign templates -created that are not linked to any model and/or any linked to the corresponding model.
  • +
  • The “Sign from template” action will be available if there are any +sign templates created that are not linked to any model and/or any +linked to the corresponding model.
  • Select a template.
  • Click on the “Generate” button.
  • -
  • 3 requests will be created (each linked to each selected record) BUT no signer will be set.
  • -
  • Some extra modules (e.g. maintenance_sign_oca) will automatically set the signers for each request.
  • +
  • 3 requests will be created (each linked to each selected record) BUT +no signer will be set.
  • +
  • Some extra modules (e.g. maintenance_sign_oca) will automatically set +the signers for each request.
@@ -469,9 +481,9 @@

Known issues / Roadmap

Tasks

    -
  • Ensure that the signature is inalterable. -Maybe we might need to use some tools like endevise or pyHanko with a certificate. -Signer can be authenticated using OTP.
  • +
  • Ensure that the signature is inalterable. Maybe we might need to use +some tools like endevise or pyHanko with a certificate. Signer can be +authenticated using OTP.
@@ -480,7 +492,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.

@@ -494,7 +506,7 @@

Authors

Contributors

diff --git a/sign_oca/tests/test_sign.py b/sign_oca/tests/test_sign.py index ecc10567..87fff627 100644 --- a/sign_oca/tests/test_sign.py +++ b/sign_oca/tests/test_sign.py @@ -168,10 +168,7 @@ def test_sign_request_role_with_default(self): def test_sign_request_role_with_expression(self): request_form = Form(self.env["sign.oca.request"]) - request_form.record_ref = "%s,%s" % ( - self.partner_child._name, - self.partner_child.id, - ) + request_form.record_ref = f"{self.partner_child._name},{self.partner_child.id}" with request_form.signer_ids.new() as signer: signer.role_id = self.role_child_partner self.assertEqual(signer.partner_id, self.partner) diff --git a/sign_oca/tests/test_sign_portal.py b/sign_oca/tests/test_sign_portal.py index 529b685b..6ea712ae 100644 --- a/sign_oca/tests/test_sign_portal.py +++ b/sign_oca/tests/test_sign_portal.py @@ -53,14 +53,12 @@ def test_portal(self): self.assertEqual( base64.b64decode(self.data), self.url_open( - "/sign_oca/content/%s/%s" - % (self.request.signer_ids.id, self.request.signer_ids.access_token) + f"/sign_oca/content/{self.request.signer_ids.id}/{self.request.signer_ids.access_token}" ).content, ) self.assertEqual( self.url_open( - "/sign_oca/info/%s/%s" - % (self.request.signer_ids.id, self.request.signer_ids.access_token), + f"/sign_oca/info/{self.request.signer_ids.id}/{self.request.signer_ids.access_token}", data="{}", headers={"Content-Type": "application/json"}, ).json()["result"]["items"][str(self.item["id"])], diff --git a/sign_oca/wizards/sign_oca_template_generate.py b/sign_oca/wizards/sign_oca_template_generate.py index 5eaa2c0b..85f6e6bf 100644 --- a/sign_oca/wizards/sign_oca_template_generate.py +++ b/sign_oca/wizards/sign_oca_template_generate.py @@ -5,7 +5,6 @@ class SignOcaTemplateGenerate(models.TransientModel): - _name = "sign.oca.template.generate" _description = "Generate a signature request"