[FIX] qweb: handle variable expressions in t-if

closes #390
closes #362
This commit is contained in:
Géry Debongnie
2019-10-23 18:33:51 +02:00
committed by aab-odoo
parent 403935a41e
commit a3317ab997
6 changed files with 37 additions and 10 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
import { compileExpr, QWebVar } from "./expression_parser";
import { compileExpr, QWebVar, QWebExprVar } from "./expression_parser";
export const INTERP_REGEXP = /\{\{.*?\}\}/g;
//------------------------------------------------------------------------------
@@ -145,7 +145,7 @@ export class CompilationContext {
this.addLine("}");
}
getValue(val: any): any {
getValue(val: any): QWebExprVar | string {
return val in this.variables ? this.getValue(this.variables[val]) : val;
}