[FIX] survey: fix the survey list view

It was not possible to open the survey list view anymore because the renderer
override was trying to set the "canCreate" property, which only as a getter.

Instead, we base our logic on the existing "canCreate" property, as it does
exactly what we want.

Task-3026904

closes odoo/odoo#103351

X-original-commit: 6db2847b476a21d6a96baddecb8231e47157ae0e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
Aurélien Warnon
2022-10-18 12:19:39 +02:00
parent e0139fc677
commit 286fe8dca1
@@ -55,7 +55,7 @@ export function useSurveyLoadSampleHook(selector) {
export class SurveyListRenderer extends ListRenderer {
setup() {
super.setup();
this.canCreate = this.props.archInfo.activeActions.create;
if (this.canCreate) {
useSurveyLoadSampleHook('.o_survey_load_sample');
}