amdi-odoo 3de06d645d [FIX] survey: fix override answers
Purpose
=======
Fix the UserError which is raised when the user submits
an answer to a question having the "save as nickname" or
"save as email" option checked. In testing or non-testing mode.

Specifications
==============
When the question is marked as "save as email" or "save as nickname"
and when the user isn't public, the partner data is already saved
as the question answer (in the form of a user input line).
The answer is then pre-filled in the survey.
This is an issue because when the survey has the "users can go back"
option to False and the user tries to submit the answer, it thinks the
user is trying to changed the already saved user input line and it crashes
for security reasons.

In addition of allowing the answer override if the user can go back,
also allow the override if the question is marked as "save as nickname"
or "save as email".

This issue was introduced in 17.0 when the overwrite_existing optional
parameter has been added on the _save_lines method. Before that, the
existing user input lines were overwritten no matter what.

related odoo/odoo#129329

Task-3756749

closes odoo/odoo#155561

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2024-03-06 16:10:52 +00:00
2024-03-06 16:10:52 +00:00
2024-02-21 11:28:04 +00:00
…
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%