[FIX] qweb: issue when rendering twice dynamic t-calls

The previous implementation generated an id each time the template was
rendered, instead of just once per new dynamic template found.
This commit is contained in:
Géry Debongnie
2020-10-19 22:17:10 +02:00
committed by aab-odoo
parent ed9d820d9e
commit a68d7774c6
3 changed files with 37 additions and 6 deletions
+3
View File
@@ -1111,6 +1111,9 @@ describe("t-call (template calling", () => {
expect(renderToString(qweb, "main", { template: "foo", val: "foo" })).toBe(expected);
const expected2 = "<div><bar>quux</bar></div>";
expect(renderToString(qweb, "main", { template: "bar", val: "quux" })).toBe(expected2);
// duplicate call because there was a specific bug with some id that was
// incremented each rendering.
expect(renderToString(qweb, "main", { template: "bar", val: "quux" })).toBe(expected2);
});
});