[FIX] qweb: conditional t-call with body

When a t-call has a condition and a body
the t-if's and its flavors should be ignored when compiling the body of a t-call
This commit is contained in:
Lucas Perais (lpe)
2019-12-11 13:58:55 +01:00
committed by Géry Debongnie
parent b96ea79f2b
commit 08022b49df
3 changed files with 49 additions and 1 deletions
+3 -1
View File
@@ -242,7 +242,9 @@ QWeb.addDirective({
ctx.indent();
protectID = ctx.startProtectScope();
const nodeCopy = node.cloneNode(true) as Element;
nodeCopy.removeAttribute("t-call");
for (let attr of ["t-if", "t-else", "t-elif", "t-call"]) {
nodeCopy.removeAttribute(attr);
}
const parentNode = ctx.parentNode;
ctx.parentNode = "__0";
// this local scope is intended to trap c__0