[IMP] config: add enableTransitions flag to config

It is useful to be able to disable the t-transition directive for
testing purposes.  This commit introduces a global config flag to do
just that.

closes #768
This commit is contained in:
Géry Debongnie
2020-10-20 13:05:39 +02:00
committed by aab-odoo
parent a68d7774c6
commit b08cc1d084
4 changed files with 33 additions and 2 deletions
+10
View File
@@ -8,6 +8,7 @@ import { QWeb } from "./qweb/index";
interface Config {
mode: string;
enableTransitions: boolean;
}
export const config = {} as Config;
@@ -28,3 +29,12 @@ Object.defineProperty(config, "mode", {
}
},
});
Object.defineProperty(config, "enableTransitions", {
get() {
return QWeb.enableTransitions;
},
set(value: boolean) {
QWeb.enableTransitions = value;
},
});