[FIX] qweb: allow mixing body and expression variables

closes #445
This commit is contained in:
Géry Debongnie
2019-11-14 13:38:38 +01:00
committed by aab-odoo
parent f2b3ebd1ec
commit bbdc9d90d7
5 changed files with 149 additions and 40 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
import { compileExpr, QWebVar, QWebExprVar } from "./expression_parser";
import { compileExpr, QWebVar } from "./expression_parser";
export const INTERP_REGEXP = /\{\{.*?\}\}/g;
//------------------------------------------------------------------------------
@@ -149,7 +149,7 @@ export class CompilationContext {
this.addLine("}");
}
getValue(val: any): QWebExprVar | string {
getValue(val: any): QWebVar | string {
return val in this.variables ? this.getValue(this.variables[val]) : val;
}