diff --git a/report_qweb_parameter/README.rst b/report_qweb_parameter/README.rst index d6b00838b9..c8277605ec 100644 --- a/report_qweb_parameter/README.rst +++ b/report_qweb_parameter/README.rst @@ -72,13 +72,17 @@ Authors Contributors ------------ -- Enric Tobella +- Enric Tobella -- `Tecnativa `__: +- `Tecnativa `__: - - Carlos Roca + - Carlos Roca -- Iván Antón +- Iván Antón + +- `Sygel Technology `__: + + - Valentin Vinagre Maintainers ----------- diff --git a/report_qweb_parameter/demo/test_report_field_length.xml b/report_qweb_parameter/demo/test_report_field_length.xml index 774f426ccc..29135c2971 100644 --- a/report_qweb_parameter/demo/test_report_field_length.xml +++ b/report_qweb_parameter/demo/test_report_field_length.xml @@ -15,6 +15,11 @@ t-esc="docs[0].street" t-if="docs[0].street" /> +
  • +
  • +
  • - Carlos Roca - Iván Antón \<\> + +- [Sygel Technology](https://www.sygel.es): + + > - Valentin Vinagre diff --git a/report_qweb_parameter/static/description/index.html b/report_qweb_parameter/static/description/index.html index f9b095124d..50b285b11f 100644 --- a/report_qweb_parameter/static/description/index.html +++ b/report_qweb_parameter/static/description/index.html @@ -431,6 +431,13 @@

    Contributors

  • Iván Antón <ozono@ozonomultimedia.com>

  • +
  • Sygel Technology:

    +
    +
      +
    • Valentin Vinagre
    • +
    +
    +
  • diff --git a/report_qweb_parameter/tests/test_report_qweb_parameter.py b/report_qweb_parameter/tests/test_report_qweb_parameter.py index 19dd76c8ac..7468252006 100644 --- a/report_qweb_parameter/tests/test_report_qweb_parameter.py +++ b/report_qweb_parameter/tests/test_report_qweb_parameter.py @@ -24,9 +24,18 @@ def test_qweb_parameter(self): docs.website = "1234567890" # for avoding that Odoo adds http:// rep = report_object._render(report_name, docs.ids, False) root = ET.fromstring(rep[0]) + + # test length self.assertEqual(root[0].text, "1234567890") - self.assertEqual(root[2].text, "1234567890") - self.assertEqual(root[4].text, "1234567890") + self.assertEqual(root[3].text, "1234567890") + self.assertEqual(root[6].text, "1234567890") + + # test condicional length + self.assertEqual(root[1].text, "Tes") + self.assertEqual(root[4].text, "Test") + self.assertEqual(root[7].text, "Test ") + + # test maxlength docs.update({"street": "123456789"}) with self.assertRaises(QWebException): report_object._render(report_name, docs.ids, False)