From c0cb2801dc923cd7d6824f0d6d1342f0b64140cd Mon Sep 17 00:00:00 2001 From: John Herholz Date: Fri, 28 Jun 2024 19:38:04 +0200 Subject: [PATCH] [IMP] pre-commit auto fixes --- edi_exchange_template_oca/README.rst | 19 +- edi_exchange_template_oca/__manifest__.py | 2 +- .../models/edi_backend.py | 2 +- edi_exchange_template_oca/pyproject.toml | 3 + .../readme/CONTRIBUTORS.md | 2 + .../readme/CONTRIBUTORS.rst | 1 - .../readme/DESCRIPTION.md | 6 + .../readme/DESCRIPTION.rst | 6 - .../static/description/index.html | 1020 ++++++++++------- .../tests/test_edi_backend_output.py | 2 +- 10 files changed, 618 insertions(+), 445 deletions(-) create mode 100644 edi_exchange_template_oca/pyproject.toml create mode 100644 edi_exchange_template_oca/readme/CONTRIBUTORS.md delete mode 100644 edi_exchange_template_oca/readme/CONTRIBUTORS.rst create mode 100644 edi_exchange_template_oca/readme/DESCRIPTION.md delete mode 100644 edi_exchange_template_oca/readme/DESCRIPTION.rst diff --git a/edi_exchange_template_oca/README.rst b/edi_exchange_template_oca/README.rst index 1f321e828..7ba7ade97 100644 --- a/edi_exchange_template_oca/README.rst +++ b/edi_exchange_template_oca/README.rst @@ -17,13 +17,13 @@ EDI Exchange Template :target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html :alt: License: LGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fedi--framework-lightgray.png?logo=github - :target: https://github.com/OCA/edi-framework/tree/16.0/edi_exchange_template_oca + :target: https://github.com/OCA/edi-framework/tree/17.0/edi_exchange_template_oca :alt: OCA/edi-framework .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/edi-framework-16-0/edi-framework-16-0-edi_exchange_template_oca + :target: https://translation.odoo-community.org/projects/edi-framework-17-0/edi-framework-17-0-edi_exchange_template_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/edi-framework&target_branch=16.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/edi-framework&target_branch=17.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -46,7 +46,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. @@ -54,18 +54,19 @@ Credits ======= Authors -~~~~~~~ +------- * ACSONE * Camptocamp Contributors -~~~~~~~~~~~~ +------------ -* Simone Orsi +- Simone Orsi +- John Herholz Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. @@ -85,6 +86,6 @@ Current `maintainer `__: |maintainer-simahawk| -This module is part of the `OCA/edi-framework `_ project on GitHub. +This module is part of the `OCA/edi-framework `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/edi_exchange_template_oca/__manifest__.py b/edi_exchange_template_oca/__manifest__.py index 26a9d657c..5e91f34db 100644 --- a/edi_exchange_template_oca/__manifest__.py +++ b/edi_exchange_template_oca/__manifest__.py @@ -5,7 +5,7 @@ { "name": "EDI Exchange Template", "summary": """Allows definition of exchanges via templates.""", - "version": "16.0.1.1.1", + "version": "17.0.1.0.0", "development_status": "Beta", "license": "LGPL-3", "author": "ACSONE,Camptocamp,Odoo Community Association (OCA)", diff --git a/edi_exchange_template_oca/models/edi_backend.py b/edi_exchange_template_oca/models/edi_backend.py index ad3fe5e2a..3e8b21622 100644 --- a/edi_exchange_template_oca/models/edi_backend.py +++ b/edi_exchange_template_oca/models/edi_backend.py @@ -12,7 +12,7 @@ def _exchange_generate(self, exchange_record, **kw): # Template take precedence over component lookup tmpl = self._get_output_template(exchange_record) if tmpl: - # FIXME: env_ctx is not propagated here because we bypass components completly. + # FIXME: env_ctx is not propagated here as we bypass components completely. # It would be better to move this machinery inside a `generate` component. exchange_record = exchange_record.with_context( edi_framework_action="generate" diff --git a/edi_exchange_template_oca/pyproject.toml b/edi_exchange_template_oca/pyproject.toml new file mode 100644 index 000000000..4231d0ccc --- /dev/null +++ b/edi_exchange_template_oca/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/edi_exchange_template_oca/readme/CONTRIBUTORS.md b/edi_exchange_template_oca/readme/CONTRIBUTORS.md new file mode 100644 index 000000000..ef4930964 --- /dev/null +++ b/edi_exchange_template_oca/readme/CONTRIBUTORS.md @@ -0,0 +1,2 @@ +- Simone Orsi \<\> +- John Herholz \<\> diff --git a/edi_exchange_template_oca/readme/CONTRIBUTORS.rst b/edi_exchange_template_oca/readme/CONTRIBUTORS.rst deleted file mode 100644 index f583948be..000000000 --- a/edi_exchange_template_oca/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1 +0,0 @@ -* Simone Orsi diff --git a/edi_exchange_template_oca/readme/DESCRIPTION.md b/edi_exchange_template_oca/readme/DESCRIPTION.md new file mode 100644 index 000000000..7c4bd4f45 --- /dev/null +++ b/edi_exchange_template_oca/readme/DESCRIPTION.md @@ -0,0 +1,6 @@ +Provide EDI exchange templates to control input/output records contents. + +Provides following models: + +1. EDI exchange output template, generates output using QWeb templates +2. \[TODO\] EDI exchange input template diff --git a/edi_exchange_template_oca/readme/DESCRIPTION.rst b/edi_exchange_template_oca/readme/DESCRIPTION.rst deleted file mode 100644 index 491f1212a..000000000 --- a/edi_exchange_template_oca/readme/DESCRIPTION.rst +++ /dev/null @@ -1,6 +0,0 @@ -Provide EDI exchange templates to control input/output records contents. - -Provides following models: - -1. EDI exchange output template, generates output using QWeb templates -2. [TODO] EDI exchange input template diff --git a/edi_exchange_template_oca/static/description/index.html b/edi_exchange_template_oca/static/description/index.html index b03e328a1..b950a29df 100644 --- a/edi_exchange_template_oca/static/description/index.html +++ b/edi_exchange_template_oca/static/description/index.html @@ -1,428 +1,596 @@ - - - - -EDI Exchange Template - - - -
-

EDI Exchange Template

- - -

Beta License: LGPL-3 OCA/edi-framework Translate me on Weblate Try me on Runboat

-

Provide EDI exchange templates to control input/output records contents.

-

Provides following models:

-
    -
  1. EDI exchange output template, generates output using QWeb templates
  2. -
  3. [TODO] EDI exchange input template
  4. -
-

Table of contents

- -
-

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.

-

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

-
-
-

Credits

-
-

Authors

-
    -
  • ACSONE
  • -
  • Camptocamp
  • -
-
-
-

Contributors

- -
-
-

Maintainers

-

This module is maintained by the OCA.

-Odoo Community Association -

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.

-

Current maintainer:

-

simahawk

-

This module is part of the OCA/edi-framework project on GitHub.

-

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

-
-
-
- + + + + EDI Exchange Template + + + +
+

EDI Exchange Template

+ + +

+ + Beta + + + License: LGPL-3 + + + OCA/edi-framework + + + Translate me on Weblate + + + Try me on Runboat + +

+

Provide EDI exchange templates to control input/output records contents.

+

Provides following models:

+
    +
  1. EDI exchange output template, generates output using QWeb templates
  2. +
  3. [TODO] EDI exchange input template
  4. +
+

+ Table of contents +

+
+ +
+
+

+ 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. +

+

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

+
+
+

+ Credits +

+
+

+ Authors +

+
    +
  • ACSONE
  • +
  • Camptocamp
  • +
+
+
+

+ Contributors +

+ +
+
+

+ Maintainers +

+

This module is maintained by the OCA.

+ + Odoo Community Association + +

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. +

+

Current + maintainer: +

+

+ + simahawk + +

+

This module is part of the + + OCA/edi-framework + + project on GitHub. +

+

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

+
+
+
+ diff --git a/edi_exchange_template_oca/tests/test_edi_backend_output.py b/edi_exchange_template_oca/tests/test_edi_backend_output.py index 9e6c75b0f..013a51784 100644 --- a/edi_exchange_template_oca/tests/test_edi_backend_output.py +++ b/edi_exchange_template_oca/tests/test_edi_backend_output.py @@ -138,7 +138,7 @@ def test_get_template(self): def test_generate_file(self): output = self.backend.exchange_generate(self.record1) - expected = "{0.ref} - {0.name}".format(self.partner) + expected = f"{self.partner.ref} - {self.partner.name}" self.assertEqual(output, "Exchange data generated") file_content = self.record1._get_file_content() self.assertEqual(file_content.strip(), expected)