From ca4c2f4446b3df0e4ee356499c420fa453ffc15c Mon Sep 17 00:00:00 2001 From: Benjamin Willig Date: Fri, 16 Feb 2024 08:57:07 +0100 Subject: [PATCH] [MIG] punchout: Migration to 16.0 --- punchout/README.rst | 159 ++++++ punchout/__manifest__.py | 2 +- punchout/controllers/main.py | 4 +- punchout/models/punchout_backend.py | 62 ++- punchout/models/punchout_session.py | 45 +- punchout/static/description/index.html | 507 ++++++++++++++++++ punchout/tests/common.py | 8 +- punchout/views/punchout_backend.xml | 46 +- punchout_environment/README.rst | 112 ++++ punchout_environment/__manifest__.py | 2 +- .../static/description/index.html | 461 ++++++++++++++++ punchout_queue_job/README.rst | 121 +++++ punchout_queue_job/__manifest__.py | 2 +- punchout_queue_job/models/punchout_session.py | 8 +- .../static/description/index.html | 469 ++++++++++++++++ requirements.txt | 1 + setup/punchout/odoo/addons/punchout | 1 + setup/punchout/setup.py | 6 + .../odoo/addons/punchout_environment | 1 + setup/punchout_environment/setup.py | 6 + .../odoo/addons/punchout_queue_job | 1 + setup/punchout_queue_job/setup.py | 6 + 22 files changed, 1977 insertions(+), 53 deletions(-) create mode 100644 punchout/README.rst create mode 100644 punchout/static/description/index.html create mode 100644 punchout_environment/README.rst create mode 100644 punchout_environment/static/description/index.html create mode 100644 punchout_queue_job/README.rst create mode 100644 punchout_queue_job/static/description/index.html create mode 120000 setup/punchout/odoo/addons/punchout create mode 100644 setup/punchout/setup.py create mode 120000 setup/punchout_environment/odoo/addons/punchout_environment create mode 100644 setup/punchout_environment/setup.py create mode 120000 setup/punchout_queue_job/odoo/addons/punchout_queue_job create mode 100644 setup/punchout_queue_job/setup.py diff --git a/punchout/README.rst b/punchout/README.rst new file mode 100644 index 0000000000..c51aa62bbe --- /dev/null +++ b/punchout/README.rst @@ -0,0 +1,159 @@ +======== +Punchout +======== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:a575761638f19894b0e09efcaa56bf2fe5fe3f97a4ab1109909e8a2def537c5c + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fedi-lightgray.png?logo=github + :target: https://github.com/OCA/edi/tree/16.0/punchout + :alt: OCA/edi +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/edi-16-0/edi-16-0-punchout + :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&target_branch=16.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module setup the base configuration to access a punchout platform, +in order to populate odoo. For example, creating purchase orders. This +alpha version has been implemented using the eShop Wurth. + +**Table of contents** + +.. contents:: + :local: + +Use Cases / Context +=================== + +[ This file is optional but strongly suggested to allow end-users to +evaluate the module's usefulness in their context. ] + +This module set up the base of the connection to a punchout system. Sub +module can be created for example to create a purchase order from a +shopping cart created in the punchout platform. To do this, you can make +your model inherit from "punchout.request" and add the import process by +inheriting "action_process" method. + +Linked modules: + +- punchout_environment : allows to configure a punchout backend through + server environment files +- punchout_queue_job : link the punchout request to queue jobs, + automatically call the process method when a response is received + +Installation +============ + +[ This file must only be present if there are very specific installation +instructions, such as installing non-python dependencies. The audience +is systems administrators. ] + +Configuration +============= + +[ This file is optional, it should explain how to configure the module +before using it; it is aimed at advanced users. ] + +To configure this module, you need to access the "PunchOut Backend" menu +and create a new record. + +Usage +===== + +[ This file must be present and contains the usage instructions for +end-users. As all other rst files included in the README, it MUST NOT +contain reStructuredText sections only body text (paragraphs, lists, +tables, etc). Should you need a more elaborate structure to explain the +addon, please create a Sphinx documentation (which may include this file +as a "quick start" section). ] + +To use this module, you need to: + +1. Configure a punchout backend +2. Click the "Access button". It will create a punchout request. +3. Use the punchout backend website and trigger a response to Odoo +4. Check that the response has been correctly linked to the previously + created punchout request + +Known issues / Roadmap +====================== + +[ Enumerate known caveats and future potential improvements. It is +mostly intended for end-users, and can also help potential new +contributors discovering new features to implement. ] + +- + +Changelog +========= + +13.0.1.0.0 (2023-09-26) +----------------------- + +- [ADD] First version. + +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 SA/NV + +Contributors +------------ + +- Thomas Binsfeld thomas.binsfeld@acsone.eu (ACSONE SA/NV) +- Benjamin Willig benjamin.willig@acsone.eu (ACSONE SA/NV) + +Other credits +------------- + +[ This file is optional and contains additional credits, other than +authors, contributors, and maintainers. ] + +The development of this module has been financially supported by: + +- ACSONE SA/NV + +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/edi `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/punchout/__manifest__.py b/punchout/__manifest__.py index 8932c978bb..d5b0f99706 100644 --- a/punchout/__manifest__.py +++ b/punchout/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Punchout", - "version": "13.0.1.0.0", + "version": "16.0.1.0.0", "license": "AGPL-3", "author": "Odoo Community Association (OCA), ACSONE SA/NV", "website": "https://github.com/OCA/edi", diff --git a/punchout/controllers/main.py b/punchout/controllers/main.py index 05948ddff7..9010a10e05 100644 --- a/punchout/controllers/main.py +++ b/punchout/controllers/main.py @@ -4,7 +4,7 @@ import logging from base64 import b64decode -from odoo.http import Controller, local_redirect, request, route +from odoo.http import Controller, request, route _logger = logging.getLogger(__name__) @@ -40,4 +40,4 @@ def receive_punchout_response(self, backend_id, *args, **kwargs): ) else: redirect_url = punchout_session._get_redirect_url() - return local_redirect(redirect_url) + return request.redirect_query(redirect_url) diff --git a/punchout/models/punchout_backend.py b/punchout/models/punchout_backend.py index 76358f0f05..476ba81110 100644 --- a/punchout/models/punchout_backend.py +++ b/punchout/models/punchout_backend.py @@ -13,37 +13,69 @@ class PunchoutBackend(models.Model): ("name_unique", "unique(name)", _("This PunchOut backend already exists.")) ] - name = fields.Char(string="Name", required=True,) - url = fields.Char(string="URL", required=True,) + name = fields.Char( + required=True, + ) + description = fields.Char( + required=True, + ) + url = fields.Char( + string="URL", + required=True, + ) from_domain = fields.Char( - string="From domain", required=True, groups="base.group_system", + string="From domain", + required=True, + groups="base.group_system", ) from_identity = fields.Char( - string="From identity", required=True, groups="base.group_system", + string="From identity", + required=True, + groups="base.group_system", + ) + to_domain = fields.Char( + string="To domain", + required=True, ) - to_domain = fields.Char(string="To domain", required=True,) to_identity = fields.Char( - string="To identity", required=True, groups="base.group_system", + string="To identity", + required=True, + groups="base.group_system", ) shared_secret = fields.Char( - string="Shared secret", required=True, groups="base.group_system", + string="Shared secret", + required=True, + groups="base.group_system", + ) + user_agent = fields.Char( + string="User agent", + required=True, ) - user_agent = fields.Char(string="User agent", required=True,) deployment_mode = fields.Char( - string="Deployment mode", help="Test or production", required=True, + string="Deployment mode", + help="Test or production", + required=True, ) browser_form_post_url = fields.Char( string="Browser form post URL", help="Exposed URL where the shopping cart must be sent back to.", required=True, ) - dtd_version = fields.Char(default="1.2.008",) + dtd_version = fields.Char( + default="1.2.008", + ) dtd_file = fields.Binary( - string="DTD File for validation", groups="base.group_system", + string="DTD File for validation", + groups="base.group_system", + ) + dtd_filename = fields.Char( + groups="base.group_system", ) - dtd_filename = fields.Char(groups="base.group_system",) state = fields.Selection(selection="_selection_state", default="draft") - session_duration = fields.Integer(string="Maximum session duration", default=7200,) + session_duration = fields.Integer( + string="Maximum session duration", + default=7200, + ) @api.constrains("session_duration") def _check_session_duration(self): @@ -103,7 +135,9 @@ def redirect_to_backend(self): self._check_access_backend() return ( self.env["punchout.session"] - .with_context(punchout_backend_id=self.id,) + .with_context( + punchout_backend_id=self.id, + ) ._redirect_to_punchout() ) diff --git a/punchout/models/punchout_session.py b/punchout/models/punchout_session.py index 6bf463b9f8..6bc814e10c 100644 --- a/punchout/models/punchout_session.py +++ b/punchout/models/punchout_session.py @@ -31,37 +31,60 @@ class PunchoutSession(models.Model): _order = "create_date desc" _description = "Punchout Session" - backend_id = fields.Many2one(comodel_name="punchout.backend", readonly=True,) + backend_id = fields.Many2one( + comodel_name="punchout.backend", + readonly=True, + ) user_id = fields.Many2one( - comodel_name="res.users", readonly=True, default=lambda self: self.env.uid, + comodel_name="res.users", + readonly=True, + default=lambda self: self.env.uid, ) buyer_cookie_id = fields.Char(readonly=True, string="Cookie") punchout_url = fields.Char(readonly=True, string="Start URL") - cxml_setup_request = fields.Text(readonly=True, string="Setup Request",) + cxml_setup_request = fields.Text( + readonly=True, + string="Setup Request", + ) cxml_setup_request_response = fields.Text( - readonly=True, string="Setup Request Response", + readonly=True, + string="Setup Request Response", + ) + cxml_response = fields.Text( + readonly=True, + string="Response", + ) + cxml_response_date = fields.Datetime( + readonly=True, + string="Response Date", ) - cxml_response = fields.Text(readonly=True, string="Response",) - cxml_response_date = fields.Datetime(readonly=True, string="Response Date",) expiration_date = fields.Datetime( compute="_compute_expiration_date", store=True, readonly=True, compute_sudo=True, ) - error_message = fields.Text(readonly=True,) + error_message = fields.Text( + readonly=True, + ) state = fields.Selection( - selection="_selection_state", default="draft", tracking=True, + selection="_selection_state", + default="draft", + tracking=True, + readonly=True, ) action_process_allowed = fields.Boolean(compute="_compute_action_process_allowed") - @api.depends("state",) + @api.depends( + "state", + ) def _compute_action_process_allowed(self): for rec in self: rec.action_process_allowed = rec.state in ("to_process", "error") @api.depends( - "backend_id", "create_date", + "backend_id", + "create_date", ) def _compute_expiration_date(self): for rec in self: @@ -116,7 +139,7 @@ def _render_cxml_operation(self, template_xml_id, template_values=None): cxml = ( self.env["ir.ui.view"] .sudo() - .render_template(template_xml_id, template_values) + ._render_template(template_xml_id, values=template_values) ) cxml_request_element = ET.fromstring(cxml) ET.indent(cxml_request_element) diff --git a/punchout/static/description/index.html b/punchout/static/description/index.html new file mode 100644 index 0000000000..e1bb7f90dd --- /dev/null +++ b/punchout/static/description/index.html @@ -0,0 +1,507 @@ + + + + + +Punchout + + + +
+

Punchout

+ + +

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

+

This module setup the base configuration to access a punchout platform, +in order to populate odoo. For example, creating purchase orders. This +alpha version has been implemented using the eShop Wurth.

+

Table of contents

+ +
+

Use Cases / Context

+

[ This file is optional but strongly suggested to allow end-users to +evaluate the module’s usefulness in their context. ]

+

This module set up the base of the connection to a punchout system. Sub +module can be created for example to create a purchase order from a +shopping cart created in the punchout platform. To do this, you can make +your model inherit from “punchout.request” and add the import process by +inheriting “action_process” method.

+

Linked modules:

+
    +
  • punchout_environment : allows to configure a punchout backend through +server environment files
  • +
  • punchout_queue_job : link the punchout request to queue jobs, +automatically call the process method when a response is received
  • +
+
+
+

Installation

+

[ This file must only be present if there are very specific installation +instructions, such as installing non-python dependencies. The audience +is systems administrators. ]

+
+
+

Configuration

+

[ This file is optional, it should explain how to configure the module +before using it; it is aimed at advanced users. ]

+

To configure this module, you need to access the “PunchOut Backend” menu +and create a new record.

+
+
+

Usage

+

[ This file must be present and contains the usage instructions for +end-users. As all other rst files included in the README, it MUST NOT +contain reStructuredText sections only body text (paragraphs, lists, +tables, etc). Should you need a more elaborate structure to explain the +addon, please create a Sphinx documentation (which may include this file +as a “quick start” section). ]

+

To use this module, you need to:

+
    +
  1. Configure a punchout backend
  2. +
  3. Click the “Access button”. It will create a punchout request.
  4. +
  5. Use the punchout backend website and trigger a response to Odoo
  6. +
  7. Check that the response has been correctly linked to the previously +created punchout request
  8. +
+
+
+

Known issues / Roadmap

+

[ Enumerate known caveats and future potential improvements. It is +mostly intended for end-users, and can also help potential new +contributors discovering new features to implement. ]

+
    +
  • +
+
+
+

Changelog

+
+

13.0.1.0.0 (2023-09-26)

+
    +
  • [ADD] First version.
  • +
+
+
+
+

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 SA/NV
  • +
+
+
+

Contributors

+ +
+
+

Other credits

+

[ This file is optional and contains additional credits, other than +authors, contributors, and maintainers. ]

+

The development of this module has been financially supported by:

+
    +
  • ACSONE SA/NV
  • +
+
+
+

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.

+

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

+

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

+
+
+
+ + diff --git a/punchout/tests/common.py b/punchout/tests/common.py index 4825fe534e..5a997c4dda 100644 --- a/punchout/tests/common.py +++ b/punchout/tests/common.py @@ -3,10 +3,10 @@ from uuid import uuid4 -from odoo.tests.common import SavepointCase +from odoo.tests.common import TransactionCase -class TestPunchoutCommon(SavepointCase): +class TestPunchoutCommon(TransactionCase): @classmethod def setUpClass(cls): super().setUpClass() @@ -15,6 +15,7 @@ def setUpClass(cls): cls.backend = cls.backend_model.create( { "name": uuid4(), + "description": uuid4(), "from_domain": "from", "from_identity": "from", "to_domain": "to", @@ -42,5 +43,6 @@ def _get_response_xml_content(self, filepath, filename): def _store_response(self, cxml_string): return self.session_model._store_punchout_session_response( - self.backend.id, cxml_string, + self.backend.id, + cxml_string, ) diff --git a/punchout/views/punchout_backend.xml b/punchout/views/punchout_backend.xml index 4cf1da3512..aa4a27e710 100644 --- a/punchout/views/punchout_backend.xml +++ b/punchout/views/punchout_backend.xml @@ -14,7 +14,7 @@ icon="fa-sign-in" string="Access" /> - +
@@ -25,24 +25,32 @@
- - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + +
-
@@ -52,6 +60,7 @@ + @@ -85,11 +94,12 @@ +

- +

diff --git a/punchout_environment/README.rst b/punchout_environment/README.rst new file mode 100644 index 0000000000..b37c792386 --- /dev/null +++ b/punchout_environment/README.rst @@ -0,0 +1,112 @@ +==================== +Punchout Environment +==================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:4994fed00c7c6842ab902af35c0236177d8ba9744d0e478bba5f08f48ca7283e + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fedi-lightgray.png?logo=github + :target: https://github.com/OCA/edi/tree/16.0/punchout_environment + :alt: OCA/edi +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/edi-16-0/edi-16-0-punchout_environment + :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&target_branch=16.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allows to configure a punchout backend using server +environment module. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +[ This file must be present and contains the usage instructions for +end-users. As all other rst files included in the README, it MUST NOT +contain reStructuredText sections only body text (paragraphs, lists, +tables, etc). Should you need a more elaborate structure to explain the +addon, please create a Sphinx documentation (which may include this file +as a "quick start" section). ] + +To use this module, you need to: + +1. Trigger the "Process" action on a request +2. Check the linked jobs using the smart button available on the + punchout request + +Changelog +========= + +13.0.1.0.0 (2023-09-26) +----------------------- + +- [ADD] First version. + +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 +------- + +* giACSONE SA/NV + +Contributors +------------ + +- Thomas Binsfeld thomas.binsfeld@acsone.eu (ACSONE SA/NV) +- Benjamin Willig benjamin.willig@acsone.eu (ACSONE SA/NV) + +Other credits +------------- + +[ This file is optional and contains additional credits, other than +authors, contributors, and maintainers. ] + +The development of this module has been financially supported by: + +- ACSONE SA/NV + +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/edi `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/punchout_environment/__manifest__.py b/punchout_environment/__manifest__.py index 2e855b1d23..901c560f35 100644 --- a/punchout_environment/__manifest__.py +++ b/punchout_environment/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Punchout Environment", - "version": "13.0.1.0.0", + "version": "16.0.1.0.0", "license": "AGPL-3", "author": "Odoo Community Association (OCA), giACSONE SA/NV", "website": "https://github.com/OCA/edi", diff --git a/punchout_environment/static/description/index.html b/punchout_environment/static/description/index.html new file mode 100644 index 0000000000..0ef6fae1b7 --- /dev/null +++ b/punchout_environment/static/description/index.html @@ -0,0 +1,461 @@ + + + + + +Punchout Environment + + + +
+

Punchout Environment

+ + +

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

+

This module allows to configure a punchout backend using server +environment module.

+

Table of contents

+ +
+

Usage

+

[ This file must be present and contains the usage instructions for +end-users. As all other rst files included in the README, it MUST NOT +contain reStructuredText sections only body text (paragraphs, lists, +tables, etc). Should you need a more elaborate structure to explain the +addon, please create a Sphinx documentation (which may include this file +as a “quick start” section). ]

+

To use this module, you need to:

+
    +
  1. Trigger the “Process” action on a request
  2. +
  3. Check the linked jobs using the smart button available on the +punchout request
  4. +
+
+
+

Changelog

+
+

13.0.1.0.0 (2023-09-26)

+
    +
  • [ADD] First version.
  • +
+
+
+
+

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

+
    +
  • giACSONE SA/NV
  • +
+
+
+

Contributors

+ +
+
+

Other credits

+

[ This file is optional and contains additional credits, other than +authors, contributors, and maintainers. ]

+

The development of this module has been financially supported by:

+
    +
  • ACSONE SA/NV
  • +
+
+
+

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.

+

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

+

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

+
+
+
+ + diff --git a/punchout_queue_job/README.rst b/punchout_queue_job/README.rst new file mode 100644 index 0000000000..b08e98ed70 --- /dev/null +++ b/punchout_queue_job/README.rst @@ -0,0 +1,121 @@ +================== +Punchout Queue Job +================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:9e65ac78de58b36ed5594b5bcf898d152c219f3d3543bd77e3f79e6df1039932 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fedi-lightgray.png?logo=github + :target: https://github.com/OCA/edi/tree/16.0/punchout_queue_job + :alt: OCA/edi +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/edi-16-0/edi-16-0-punchout_queue_job + :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&target_branch=16.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +Run the process of the punchout response through a job after it has been +received. + +**Table of contents** + +.. contents:: + :local: + +Use Cases / Context +=================== + +[ This file is optional but strongly suggested to allow end-users to +evaluate the module's usefulness in their context. ] + +Run the process of the punchout response through a job after it has been +received. + +Usage +===== + +[ This file must be present and contains the usage instructions for +end-users. As all other rst files included in the README, it MUST NOT +contain reStructuredText sections only body text (paragraphs, lists, +tables, etc). Should you need a more elaborate structure to explain the +addon, please create a Sphinx documentation (which may include this file +as a "quick start" section). ] + +To use this module, you need to: + +1. Trigger the "Process" action on a request +2. Check the linked jobs using the smart button available on the + punchout request + +Changelog +========= + +13.0.1.0.0 (2023-09-26) +----------------------- + +- [ADD] First version. + +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 SA/NV + +Contributors +------------ + +- Thomas Binsfeld thomas.binsfeld@acsone.eu (ACSONE SA/NV) +- Benjamin Willig benjamin.willig@acsone.eu (ACSONE SA/NV) + +Other credits +------------- + +[ This file is optional and contains additional credits, other than +authors, contributors, and maintainers. ] + +The development of this module has been financially supported by: + +- ACSONE SA/NV + +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/edi `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/punchout_queue_job/__manifest__.py b/punchout_queue_job/__manifest__.py index 5fb9900f2b..419eae7156 100644 --- a/punchout_queue_job/__manifest__.py +++ b/punchout_queue_job/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Punchout Queue Job", - "version": "13.0.1.0.0", + "version": "16.0.1.0.0", "license": "AGPL-3", "author": "Odoo Community Association (OCA), ACSONE SA/NV", "website": "https://github.com/OCA/edi", diff --git a/punchout_queue_job/models/punchout_session.py b/punchout_queue_job/models/punchout_session.py index 6d93bc4294..2c00f3adbe 100644 --- a/punchout_queue_job/models/punchout_session.py +++ b/punchout_queue_job/models/punchout_session.py @@ -12,8 +12,12 @@ class PunchoutSession(models.Model): _inherit = "punchout.session" - has_job_access = fields.Boolean(compute="_compute_has_job_access",) - job_count = fields.Integer(compute="_compute_job_count",) + has_job_access = fields.Boolean( + compute="_compute_has_job_access", + ) + job_count = fields.Integer( + compute="_compute_job_count", + ) @api.depends_context("uid") def _compute_has_job_access(self): diff --git a/punchout_queue_job/static/description/index.html b/punchout_queue_job/static/description/index.html new file mode 100644 index 0000000000..f992e209a5 --- /dev/null +++ b/punchout_queue_job/static/description/index.html @@ -0,0 +1,469 @@ + + + + + +Punchout Queue Job + + + +
+

Punchout Queue Job

+ + +

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

+

Run the process of the punchout response through a job after it has been +received.

+

Table of contents

+ +
+

Use Cases / Context

+

[ This file is optional but strongly suggested to allow end-users to +evaluate the module’s usefulness in their context. ]

+

Run the process of the punchout response through a job after it has been +received.

+
+
+

Usage

+

[ This file must be present and contains the usage instructions for +end-users. As all other rst files included in the README, it MUST NOT +contain reStructuredText sections only body text (paragraphs, lists, +tables, etc). Should you need a more elaborate structure to explain the +addon, please create a Sphinx documentation (which may include this file +as a “quick start” section). ]

+

To use this module, you need to:

+
    +
  1. Trigger the “Process” action on a request
  2. +
  3. Check the linked jobs using the smart button available on the +punchout request
  4. +
+
+
+

Changelog

+
+

13.0.1.0.0 (2023-09-26)

+
    +
  • [ADD] First version.
  • +
+
+
+
+

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 SA/NV
  • +
+
+
+

Contributors

+ +
+
+

Other credits

+

[ This file is optional and contains additional credits, other than +authors, contributors, and maintainers. ]

+

The development of this module has been financially supported by:

+
    +
  • ACSONE SA/NV
  • +
+
+
+

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.

+

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

+

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

+
+
+
+ + diff --git a/requirements.txt b/requirements.txt index 8e2b487a42..a760ab3a04 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,7 @@ # generated from manifests external_dependencies dotty-dict factur-x +lxml phonenumbers pydifact pytz diff --git a/setup/punchout/odoo/addons/punchout b/setup/punchout/odoo/addons/punchout new file mode 120000 index 0000000000..731eee884f --- /dev/null +++ b/setup/punchout/odoo/addons/punchout @@ -0,0 +1 @@ +../../../../punchout \ No newline at end of file diff --git a/setup/punchout/setup.py b/setup/punchout/setup.py new file mode 100644 index 0000000000..28c57bb640 --- /dev/null +++ b/setup/punchout/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/setup/punchout_environment/odoo/addons/punchout_environment b/setup/punchout_environment/odoo/addons/punchout_environment new file mode 120000 index 0000000000..db6cb4440f --- /dev/null +++ b/setup/punchout_environment/odoo/addons/punchout_environment @@ -0,0 +1 @@ +../../../../punchout_environment \ No newline at end of file diff --git a/setup/punchout_environment/setup.py b/setup/punchout_environment/setup.py new file mode 100644 index 0000000000..28c57bb640 --- /dev/null +++ b/setup/punchout_environment/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/setup/punchout_queue_job/odoo/addons/punchout_queue_job b/setup/punchout_queue_job/odoo/addons/punchout_queue_job new file mode 120000 index 0000000000..a30a1bb994 --- /dev/null +++ b/setup/punchout_queue_job/odoo/addons/punchout_queue_job @@ -0,0 +1 @@ +../../../../punchout_queue_job \ No newline at end of file diff --git a/setup/punchout_queue_job/setup.py b/setup/punchout_queue_job/setup.py new file mode 100644 index 0000000000..28c57bb640 --- /dev/null +++ b/setup/punchout_queue_job/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)