[MIG] report_qweb_parameter: Migration to v13

This commit is contained in:
Carlos Roca
2020-10-28 10:23:07 +01:00
committed by Francisco Ivan Anton Prieto
parent 9e94359619
commit 0980c55e62
8 changed files with 554 additions and 30 deletions

View File

@@ -30,9 +30,9 @@ class IrQWeb(models.AbstractModel):
+ ")"
)
if "t-length" in el.attrib:
length = el.attrib.pop("t-length")
el.attrib["t-esc"] = "(" + el.attrib["t-esc"] + ")[:" + length + "]"
return super(IrQWeb, self)._compile_directive_esc(el, options)
tlength = el.attrib.pop("t-length")
el.attrib["t-esc"] = "(" + el.attrib["t-esc"] + ")[:" + tlength + "]"
return super()._compile_directive_esc(el, options)
def _compile_directive_raw(self, el, options):
min_value = el.attrib.pop("t-minlength", False)
@@ -48,6 +48,6 @@ class IrQWeb(models.AbstractModel):
+ ")"
)
if "t-length" in el.attrib:
length = el.attrib.pop("t-length")
el.attrib["t-raw"] = el.attrib["t-raw"] + "[:" + length + "]"
return super(IrQWeb, self)._compile_directive_raw(el, options)
tlength = el.attrib.pop("t-length")
el.attrib["t-raw"] = el.attrib["t-raw"] + "[:" + tlength + "]"
return super()._compile_directive_raw(el, options)