[REF] qweb: use global nextID

and reset it to 1 before each test s.t. snapshots are deterministic.
This commit is contained in:
Aaron Bohy
2019-11-27 15:07:10 +01:00
parent 65344dbf1f
commit 12be815342
9 changed files with 178 additions and 180 deletions
-2
View File
@@ -192,11 +192,9 @@ QWeb.addDirective({
// extract variables from nodecopy
const tempCtx = new CompilationContext();
tempCtx.nextID = ctx.rootContext.nextID;
tempCtx.allowMultipleRoots = true;
qweb._compileNode(nodeCopy, tempCtx);
const vars = Object.assign({}, ctx.variables, tempCtx.variables);
ctx.rootContext.nextID = tempCtx.nextID;
const templateMap = Object.create(ctx.templates);
// open new scope, if necessary