-
-
Notifications
You must be signed in to change notification settings - Fork 311
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
60 changed files
with
1,825 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ stock-logistics-workflow | |
connector | ||
storage | ||
server-auth | ||
web |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from . import controllers | ||
from . import mixins | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Copyright 2023 ACSONE SA/NV | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
{ | ||
"name": "Punchout", | ||
"version": "13.0.1.0.0", | ||
"license": "AGPL-3", | ||
"author": "Odoo Community Association (OCA), ACSONE SA/NV", | ||
"website": "https://github.com/OCA/edi", | ||
"depends": [ | ||
# odoo addons | ||
"base", | ||
# OCA/web | ||
"web_notify", | ||
], | ||
"data": [ | ||
"security/punchout_backend.xml", | ||
"security/punchout_request.xml", | ||
"views/punchout_backend.xml", | ||
"views/punchout_request.xml", | ||
], | ||
"external_dependencies": {"python": ["cryptography", "lxml"]}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Copyright 2023 ACSONE SA/NV | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
import logging | ||
|
||
import werkzeug | ||
|
||
from odoo.http import Controller, request, route | ||
|
||
_logger = logging.getLogger(__name__) | ||
|
||
|
||
class PunchoutController(Controller): | ||
@route( | ||
"/punchout/cxml/receive/<int:backend_id>", | ||
type="http", | ||
auth="user", | ||
methods=["POST"], | ||
csrf=False, | ||
) | ||
def receive_punchout_response(self, backend_id, *args, **kwargs): | ||
cxml_string = kwargs.get("cxml-urlencoded") | ||
punchout_request = ( | ||
request.env["punchout.request"] | ||
.sudo() | ||
._store_punchout_request(backend_id, cxml_string) | ||
) | ||
if not punchout_request: | ||
_logger.error( | ||
"Unable to link the punchout response to a punchout.request " | ||
"with given XML: \n%s", | ||
cxml_string, | ||
) | ||
return werkzeug.utils.redirect("/web") |
Oops, something went wrong.