From 134d93a7a0d7234c3e78c12d4ef936650fc379cd Mon Sep 17 00:00:00 2001 From: Chandni Prajapati Khamar Date: Tue, 20 Feb 2024 15:30:13 +0530 Subject: [PATCH] [IMP] agreement_legal: pre-commit auto fixes --- agreement_legal/README.rst | 78 ++++++++++--------- agreement_legal/models/agreement.py | 4 +- agreement_legal/pyproject.toml | 3 + agreement_legal/readme/CONFIGURE.md | 7 ++ agreement_legal/readme/CONFIGURE.rst | 6 -- agreement_legal/readme/CONTRIBUTORS.md | 7 ++ agreement_legal/readme/CONTRIBUTORS.rst | 7 -- .../readme/{CREDITS.rst => CREDITS.md} | 6 +- agreement_legal/readme/DESCRIPTION.md | 10 +++ agreement_legal/readme/DESCRIPTION.rst | 9 --- agreement_legal/readme/ROADMAP.md | 3 + agreement_legal/readme/ROADMAP.rst | 3 - agreement_legal/readme/USAGE.md | 7 ++ agreement_legal/readme/USAGE.rst | 7 -- agreement_legal/static/description/index.html | 30 +++---- 15 files changed, 98 insertions(+), 89 deletions(-) create mode 100644 agreement_legal/pyproject.toml create mode 100644 agreement_legal/readme/CONFIGURE.md delete mode 100644 agreement_legal/readme/CONFIGURE.rst create mode 100644 agreement_legal/readme/CONTRIBUTORS.md delete mode 100644 agreement_legal/readme/CONTRIBUTORS.rst rename agreement_legal/readme/{CREDITS.rst => CREDITS.md} (54%) create mode 100644 agreement_legal/readme/DESCRIPTION.md delete mode 100644 agreement_legal/readme/DESCRIPTION.rst create mode 100644 agreement_legal/readme/ROADMAP.md delete mode 100644 agreement_legal/readme/ROADMAP.rst create mode 100644 agreement_legal/readme/USAGE.md delete mode 100644 agreement_legal/readme/USAGE.rst diff --git a/agreement_legal/README.rst b/agreement_legal/README.rst index 386828a3..1d1c55df 100644 --- a/agreement_legal/README.rst +++ b/agreement_legal/README.rst @@ -17,26 +17,27 @@ Agreements Legal :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fagreement-lightgray.png?logo=github - :target: https://github.com/OCA/agreement/tree/16.0/agreement_legal + :target: https://github.com/OCA/agreement/tree/17.0/agreement_legal :alt: OCA/agreement .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/agreement-16-0/agreement-16-0-agreement_legal + :target: https://translation.odoo-community.org/projects/agreement-17-0/agreement-17-0-agreement_legal :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/agreement&target_branch=16.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/agreement&target_branch=17.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| -This module allows you to manage agreements, letter of intent and contract content. -The module is meant to be used by the legal team of a company and to allow them -to define sections, clauses and templates with their respective content that can -be dynamic. +This module allows you to manage agreements, letter of intent and +contract content. The module is meant to be used by the legal team of a +company and to allow them to define sections, clauses and templates with +their respective content that can be dynamic. -Based on the template, an agreement can be created and the pdf document generated. +Based on the template, an agreement can be created and the pdf document +generated. -The agreement would go through a workflow to finally become a contract with the -customer signature. +The agreement would go through a workflow to finally become a contract +with the customer signature. **Table of contents** @@ -48,28 +49,29 @@ Configuration To configure this module: -* Go to Agreement > Configuration > Templates -* Create a new template with sections and clauses and their respective content -* Go to Agreement > Configuration > Stages -* Create and reorder stages to match your process +- Go to Agreement > Configuration > Templates +- Create a new template with sections and clauses and their respective + content +- Go to Agreement > Configuration > Stages +- Create and reorder stages to match your process Usage ===== To use this module: -* Go to Agreement > Agreements -* Create a new agreement -* Select a template -* Follow the process to get the required approval -* Send the invitation to the customer to review and sign the agreement +- Go to Agreement > Agreements +- Create a new agreement +- Select a template +- Follow the process to get the required approval +- Send the invitation to the customer to review and sign the agreement Known issues / Roadmap ====================== -* Split the module to remove the dependencies on sale and account and provide - the same feature in extra modules (agreement_sale, agreement_account, - agreement_purchase) +- Split the module to remove the dependencies on sale and account and + provide the same feature in extra modules (agreement_sale, + agreement_account, agreement_purchase) Bug Tracker =========== @@ -77,7 +79,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. @@ -85,34 +87,34 @@ Credits ======= Authors -~~~~~~~ +------- * Pavlov Media * Open Source Integrators * Yves Goldberg (Ygol Internetwork) Contributors -~~~~~~~~~~~~ +------------ -* Patrick Wilson -* Bhavesh Odedra -* Wolfgang Hall -* Maxime Chambreuil -* Sandip Mangukiya -* Yves Goldberg -* Tharathip Chaweewongphan +- Patrick Wilson +- Bhavesh Odedra +- Wolfgang Hall +- Maxime Chambreuil +- Sandip Mangukiya +- Yves Goldberg +- Tharathip Chaweewongphan Other credits -~~~~~~~~~~~~~ +------------- The development of this module has been financially supported by: -* Pavlov Media -* Open Source Integrators -* Yves Goldberg +- Pavlov Media +- Open Source Integrators +- Yves Goldberg Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. @@ -135,6 +137,6 @@ Current `maintainers `__: |maintainer-max3903| |maintainer-ygol| -This module is part of the `OCA/agreement `_ project on GitHub. +This module is part of the `OCA/agreement `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/agreement_legal/models/agreement.py b/agreement_legal/models/agreement.py index 6ae58601..a07a1985 100644 --- a/agreement_legal/models/agreement.py +++ b/agreement_legal/models/agreement.py @@ -376,12 +376,12 @@ def _get_default_stage_id(self): def _get_old_version_default_vals(self): self.ensure_one() default_vals = { - "name": "{} - OLD VERSION".format(self.name), + "name": f"{self.name} - OLD VERSION", "active": False, "parent_agreement_id": self.id, "version": self.version, "revision": self.revision, - "code": "{}-V{}".format(self.code, str(self.version)), + "code": f"{self.code}-V{str(self.version)}", "stage_id": self.stage_id.id, } return default_vals diff --git a/agreement_legal/pyproject.toml b/agreement_legal/pyproject.toml new file mode 100644 index 00000000..4231d0cc --- /dev/null +++ b/agreement_legal/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/agreement_legal/readme/CONFIGURE.md b/agreement_legal/readme/CONFIGURE.md new file mode 100644 index 00000000..37ab60ea --- /dev/null +++ b/agreement_legal/readme/CONFIGURE.md @@ -0,0 +1,7 @@ +To configure this module: + +- Go to Agreement \> Configuration \> Templates +- Create a new template with sections and clauses and their respective + content +- Go to Agreement \> Configuration \> Stages +- Create and reorder stages to match your process diff --git a/agreement_legal/readme/CONFIGURE.rst b/agreement_legal/readme/CONFIGURE.rst deleted file mode 100644 index 3871fc34..00000000 --- a/agreement_legal/readme/CONFIGURE.rst +++ /dev/null @@ -1,6 +0,0 @@ -To configure this module: - -* Go to Agreement > Configuration > Templates -* Create a new template with sections and clauses and their respective content -* Go to Agreement > Configuration > Stages -* Create and reorder stages to match your process diff --git a/agreement_legal/readme/CONTRIBUTORS.md b/agreement_legal/readme/CONTRIBUTORS.md new file mode 100644 index 00000000..3d6bc2d8 --- /dev/null +++ b/agreement_legal/readme/CONTRIBUTORS.md @@ -0,0 +1,7 @@ +- Patrick Wilson \<\> +- Bhavesh Odedra \<\> +- Wolfgang Hall \<\> +- Maxime Chambreuil \<\> +- Sandip Mangukiya \<\> +- Yves Goldberg \<\> +- Tharathip Chaweewongphan \<\> diff --git a/agreement_legal/readme/CONTRIBUTORS.rst b/agreement_legal/readme/CONTRIBUTORS.rst deleted file mode 100644 index 1e7ffdd3..00000000 --- a/agreement_legal/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,7 +0,0 @@ -* Patrick Wilson -* Bhavesh Odedra -* Wolfgang Hall -* Maxime Chambreuil -* Sandip Mangukiya -* Yves Goldberg -* Tharathip Chaweewongphan diff --git a/agreement_legal/readme/CREDITS.rst b/agreement_legal/readme/CREDITS.md similarity index 54% rename from agreement_legal/readme/CREDITS.rst rename to agreement_legal/readme/CREDITS.md index 76f8e5a3..39c97d57 100644 --- a/agreement_legal/readme/CREDITS.rst +++ b/agreement_legal/readme/CREDITS.md @@ -1,5 +1,5 @@ The development of this module has been financially supported by: -* Pavlov Media -* Open Source Integrators -* Yves Goldberg +- Pavlov Media +- Open Source Integrators +- Yves Goldberg diff --git a/agreement_legal/readme/DESCRIPTION.md b/agreement_legal/readme/DESCRIPTION.md new file mode 100644 index 00000000..df06c21f --- /dev/null +++ b/agreement_legal/readme/DESCRIPTION.md @@ -0,0 +1,10 @@ +This module allows you to manage agreements, letter of intent and +contract content. The module is meant to be used by the legal team of a +company and to allow them to define sections, clauses and templates with +their respective content that can be dynamic. + +Based on the template, an agreement can be created and the pdf document +generated. + +The agreement would go through a workflow to finally become a contract +with the customer signature. diff --git a/agreement_legal/readme/DESCRIPTION.rst b/agreement_legal/readme/DESCRIPTION.rst deleted file mode 100644 index 0680b36c..00000000 --- a/agreement_legal/readme/DESCRIPTION.rst +++ /dev/null @@ -1,9 +0,0 @@ -This module allows you to manage agreements, letter of intent and contract content. -The module is meant to be used by the legal team of a company and to allow them -to define sections, clauses and templates with their respective content that can -be dynamic. - -Based on the template, an agreement can be created and the pdf document generated. - -The agreement would go through a workflow to finally become a contract with the -customer signature. diff --git a/agreement_legal/readme/ROADMAP.md b/agreement_legal/readme/ROADMAP.md new file mode 100644 index 00000000..81e60653 --- /dev/null +++ b/agreement_legal/readme/ROADMAP.md @@ -0,0 +1,3 @@ +- Split the module to remove the dependencies on sale and account and + provide the same feature in extra modules (agreement_sale, + agreement_account, agreement_purchase) diff --git a/agreement_legal/readme/ROADMAP.rst b/agreement_legal/readme/ROADMAP.rst deleted file mode 100644 index 58ac79c6..00000000 --- a/agreement_legal/readme/ROADMAP.rst +++ /dev/null @@ -1,3 +0,0 @@ -* Split the module to remove the dependencies on sale and account and provide - the same feature in extra modules (agreement_sale, agreement_account, - agreement_purchase) diff --git a/agreement_legal/readme/USAGE.md b/agreement_legal/readme/USAGE.md new file mode 100644 index 00000000..d29e0431 --- /dev/null +++ b/agreement_legal/readme/USAGE.md @@ -0,0 +1,7 @@ +To use this module: + +- Go to Agreement \> Agreements +- Create a new agreement +- Select a template +- Follow the process to get the required approval +- Send the invitation to the customer to review and sign the agreement diff --git a/agreement_legal/readme/USAGE.rst b/agreement_legal/readme/USAGE.rst deleted file mode 100644 index 7e899648..00000000 --- a/agreement_legal/readme/USAGE.rst +++ /dev/null @@ -1,7 +0,0 @@ -To use this module: - -* Go to Agreement > Agreements -* Create a new agreement -* Select a template -* Follow the process to get the required approval -* Send the invitation to the customer to review and sign the agreement diff --git a/agreement_legal/static/description/index.html b/agreement_legal/static/description/index.html index 344d99a5..5a9df773 100644 --- a/agreement_legal/static/description/index.html +++ b/agreement_legal/static/description/index.html @@ -369,14 +369,15 @@

Agreements Legal

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:0295ff399e3360ceab87b6befafe455990f071e7cca04046a03e5529f21757c2 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

-

This module allows you to manage agreements, letter of intent and contract content. -The module is meant to be used by the legal team of a company and to allow them -to define sections, clauses and templates with their respective content that can -be dynamic.

-

Based on the template, an agreement can be created and the pdf document generated.

-

The agreement would go through a workflow to finally become a contract with the -customer signature.

+

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

+

This module allows you to manage agreements, letter of intent and +contract content. The module is meant to be used by the legal team of a +company and to allow them to define sections, clauses and templates with +their respective content that can be dynamic.

+

Based on the template, an agreement can be created and the pdf document +generated.

+

The agreement would go through a workflow to finally become a contract +with the customer signature.

Table of contents

    @@ -398,7 +399,8 @@

    Configuration

    To configure this module:

    • Go to Agreement > Configuration > Templates
    • -
    • Create a new template with sections and clauses and their respective content
    • +
    • Create a new template with sections and clauses and their respective +content
    • Go to Agreement > Configuration > Stages
    • Create and reorder stages to match your process
    @@ -417,9 +419,9 @@

    Usage

    Known issues / Roadmap

      -
    • Split the module to remove the dependencies on sale and account and provide -the same feature in extra modules (agreement_sale, agreement_account, -agreement_purchase)
    • +
    • Split the module to remove the dependencies on sale and account and +provide the same feature in extra modules (agreement_sale, +agreement_account, agreement_purchase)
    @@ -427,7 +429,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.

    @@ -470,7 +472,7 @@

    Maintainers

    promote its widespread use.

    Current maintainers:

    max3903 ygol

    -

    This module is part of the OCA/agreement project on GitHub.

    +

    This module is part of the OCA/agreement project on GitHub.

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