From c927f500b04fbab2cd2cd74e8b5a8d5cbca768bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 7 Mar 2021 10:00:36 +0100 Subject: [PATCH] Allow null origin for timesheet user application issue10058 review331931002 --- routes.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/routes.py b/routes.py index 634bfb5ea7..5cecee1c1d 100644 --- a/routes.py +++ b/routes.py @@ -7,8 +7,8 @@ from werkzeug.wrappers import Response from trytond.transaction import Transaction from trytond.wsgi import app -from trytond.protocols.wrappers import with_pool, with_transaction, \ - user_application +from trytond.protocols.wrappers import ( + with_pool, with_transaction, user_application, allow_null_origin) timesheet_application = user_application('timesheet') @@ -76,6 +76,7 @@ def timesheet_lines(request, pool, employee, date): @app.route('//timesheet/line/', methods=['PUT', 'DELETE']) @app.route('//timesheet/line', methods=['POST']) +@allow_null_origin @with_pool @with_transaction() @timesheet_application