Skip to Content

[FIX] survey: keep the action helper alive when the RPC is unreachable

Failed 174m merged
PR
#1315
PR Author
Roy Le
Committer
Roy Le
Commit
3d383b49f85e
Branch
20.0
Age
Up-time
Commit message
[FIX] survey: keep the action helper alive when the RPC is unreachable

`SurveySurveyActionHelper` (shown when the survey list/kanban is empty)
fetches the sample templates in `onWillStart` and lets any error
through.
In the offline clickbot (`TestMenusAdminLight.test_02_click_apps_menus_
as_admin_offline`) that RPC is cut and the whole Surveys app fails:

    Error found:
     - Current testing app is Surveys (survey.menu_surveys)
     - Currently running offline
    Connection to
"/web/dataset/call_kw/survey.survey/get_survey_templates_data"
    couldn't be established or was interrupted

Odoo's runbot never renders the helper during that test because the
enterprise `hr_appraisal_survey` ships surveys as regular data; a
community-only database without demo data has an empty list and hits it.

Swallow `ConnectionLostError` only and render the helper without
templates: "Start from scratch" stays available, other errors still
propagate.

Verified with `-i survey,web --test-enable
--test-tags=/web:TestMenusAdminLight`
on a community checkout without demo data: test_02 fails without this
change and passes with it (2/2).