diff --git a/docsource/modules180-190.rst b/docsource/modules180-190.rst index c347e652ef10..55c44cf9ae84 100644 --- a/docsource/modules180-190.rst +++ b/docsource/modules180-190.rst @@ -1104,7 +1104,7 @@ Module coverage 18.0 -> 19.0 +---------------------------------------------------+----------------------+-------------------------------------------------+ | stock_sms | | | +---------------------------------------------------+----------------------+-------------------------------------------------+ -| survey | | | +| survey |Done | | +---------------------------------------------------+----------------------+-------------------------------------------------+ | |new| survey_crm | | | +---------------------------------------------------+----------------------+-------------------------------------------------+ diff --git a/openupgrade_scripts/scripts/survey/19.0.3.7/post-migration.py b/openupgrade_scripts/scripts/survey/19.0.3.7/post-migration.py new file mode 100644 index 000000000000..7a6e4fb3c84e --- /dev/null +++ b/openupgrade_scripts/scripts/survey/19.0.3.7/post-migration.py @@ -0,0 +1,19 @@ +# Copyright 2026 Tecnativa - Carlos Lopez +# Copyright 2026 Tecnativa - Eduardo Ezerouali +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + + +from openupgradelib import openupgrade + + +def _empty_lang_ids(env): + openupgrade.logged_query( + env.cr, + "DELETE FROM res_lang_survey_survey_rel", + ) + + +@openupgrade.migrate() +def migrate(env, version): + openupgrade.load_data(env, "survey", "19.0.3.7/noupdate_changes.xml") + _empty_lang_ids(env) diff --git a/openupgrade_scripts/scripts/survey/19.0.3.7/upgrade_analysis_work.txt b/openupgrade_scripts/scripts/survey/19.0.3.7/upgrade_analysis_work.txt new file mode 100644 index 000000000000..773e491bf926 --- /dev/null +++ b/openupgrade_scripts/scripts/survey/19.0.3.7/upgrade_analysis_work.txt @@ -0,0 +1,16 @@ +---Models in module 'survey'--- +---Fields in module 'survey'--- +survey / survey.survey / lang_ids (many2many) : NEW relation: res.lang, hasdefault: default +# DONE: post-migration: clear lang_ids so each survey falls back to all installed languages instead of default that set first installed language found. +# This feature was introduced in https://github.com/odoo/odoo/pull/165760 + +survey / survey.user_input / lang_id (many2one) : NEW relation: res.lang +# NOTHING TO DO + +survey / survey.user_input.line / answer_is_correct (boolean) : now a function +survey / survey.user_input.line / answer_score (float) : now a function +# NOTHING TO DO: The fields already exist, and the computation logic remains the same. + +---XML records in module 'survey'--- +NEW res.groups.privilege: survey.res_groups_privilege_surveys (noupdate) +# NOTHING TO DO: Handled by ORM