[MIG] report_qweb_parameter: Migration to 15.0

This commit is contained in:
AlexanderAcysos
2022-02-22 17:15:00 +01:00
committed by David Ramia
parent 3cdaa82ba2
commit 41fcda22c2
6 changed files with 53 additions and 29 deletions

View File

@@ -16,7 +16,7 @@ class IrQWeb(models.AbstractModel):
raise ValidationError(_("Length cannot be more than %s") % str(max_length))
return value
def _compile_directive_esc(self, el, options):
def _compile_directive_esc(self, el, options, indent):
min_value = el.attrib.pop("t-minlength", False)
max_value = el.attrib.pop("t-maxlength", False)
if min_value or max_value:
@@ -32,9 +32,9 @@ class IrQWeb(models.AbstractModel):
if "t-length" in el.attrib:
tlength = el.attrib.pop("t-length")
el.attrib["t-esc"] = "(" + el.attrib["t-esc"] + ")[:" + tlength + "]"
return super()._compile_directive_esc(el, options)
return super()._compile_directive_esc(el, options, indent)
def _compile_directive_raw(self, el, options):
def _compile_directive_raw(self, el, options, indent):
min_value = el.attrib.pop("t-minlength", False)
max_value = el.attrib.pop("t-maxlength", False)
if min_value or max_value:
@@ -50,4 +50,4 @@ class IrQWeb(models.AbstractModel):
if "t-length" in el.attrib:
tlength = el.attrib.pop("t-length")
el.attrib["t-raw"] = el.attrib["t-raw"] + "[:" + tlength + "]"
return super()._compile_directive_raw(el, options)
return super()._compile_directive_raw(el, options, indent)