[IMP] qweb: slightly simplify generated templates

- In some cases, we can simply inline a template key instead of assigning
  it to a variable and then using that variable
- Add component name in generated code for components
This commit is contained in:
Géry Debongnie
2019-12-12 09:24:07 +01:00
committed by aab-odoo
parent 08022b49df
commit f517d44e32
9 changed files with 400 additions and 432 deletions
+1 -1
View File
@@ -189,7 +189,7 @@ QWeb.addDirective({
extraNames: ["props"],
priority: 100,
atNodeEncounter({ ctx, value, node, qweb }): boolean {
ctx.addLine("//COMPONENT");
ctx.addLine(`// Component '${value}'`);
ctx.rootContext.shouldDefineQWeb = true;
ctx.rootContext.shouldDefineParent = true;
ctx.rootContext.shouldDefineUtils = true;