From d80664d8cd9ed8f098e1ae66f215e9851457131e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20E=2E=20G=C3=B3mez?= Date: Thu, 13 Jul 2023 17:55:28 -0500 Subject: [PATCH] [ADD] Patches Survey core module --- apply_patches.sh | 3 ++- .../20230713_survey_include-post-in-answer.patch | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 patches/20230713_survey_include-post-in-answer.patch diff --git a/apply_patches.sh b/apply_patches.sh index f1acdeb..ee37f77 100755 --- a/apply_patches.sh +++ b/apply_patches.sh @@ -37,11 +37,12 @@ pt_core () #git apply $OPTIONS $SRC/patches/20210603_auth-oauth_redirects-to-root.patch #git apply $OPTIONS $SRC/patches/20220131_purchase-requisition_match-variant.patch #git apply $OPTIONS $SRC/patches/20230309_ir-attachment_allow-portal-users-attachment-access.patch + #git apply $OPTIONS $SRC/patches/20230425_stock_picking-type-from-return.patch # Included in 2023-03-09 patch: #git apply $OPTIONS $SRC/patches/20230206_ir-attachment_allow-portal-users-attachment-access.patch # Reverted in https://github.com/odoo/odoo/commit/8d1d62a8c0746abb30f97290304b761f74111a89: #git apply $OPTIONS $SRC/patches/20220204_mail_re-enables-buttons-in-notifications.patch - git apply $OPTIONS $SRC/patches/20230425_stock_picking-type-from-return.patch + git apply $OPTIONS $SRC/patches/20230713_survey_include-post-in-answer.patch popd } diff --git a/patches/20230713_survey_include-post-in-answer.patch b/patches/20230713_survey_include-post-in-answer.patch new file mode 100644 index 0000000..4d2dc39 --- /dev/null +++ b/patches/20230713_survey_include-post-in-answer.patch @@ -0,0 +1,13 @@ +diff --git a/addons/survey/controllers/main.py b/addons/survey/controllers/main.py +index 35094d3f..7763bbcd 100644 +--- a/addons/survey/controllers/main.py ++++ b/addons/survey/controllers/main.py +@@ -235,7 +235,7 @@ class Survey(http.Controller): + survey_sudo, answer_sudo = access_data['survey_sudo'], access_data['answer_sudo'] + if not answer_sudo: + try: +- answer_sudo = survey_sudo._create_answer(user=request.env.user, email=email) ++ answer_sudo = survey_sudo._create_answer(user=request.env.user, email=email, **post) + except UserError: + answer_sudo = False +