[MIG] report_qweb_parameter: Migration to 14.0
parent
6e5c2d17df
commit
110884f9b2
|
@ -72,6 +72,8 @@ Contributors
|
|||
|
||||
* Carlos Roca
|
||||
|
||||
* Iván Antón <ozono@ozonomultimedia.com>
|
||||
|
||||
Maintainers
|
||||
~~~~~~~~~~~
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
{
|
||||
"name": "Report QWeb Parameter",
|
||||
"version": "13.0.1.0.0",
|
||||
"version": "14.0.1.0.0",
|
||||
"license": "AGPL-3",
|
||||
"summary": """
|
||||
Add new parameters for qweb templates in order to reduce field length
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<odoo>
|
||||
<report
|
||||
id="test_report_length_report_id"
|
||||
model="res.company"
|
||||
string="Length Report"
|
||||
report_type="qweb-html"
|
||||
name="report_qweb_parameter.test_report_length"
|
||||
/>
|
||||
<record id="test_report_length_report_id" model="ir.actions.report">
|
||||
<field name="name">Length Report</field>
|
||||
<field name="model">res.company</field>
|
||||
<field name="report_type">qweb-html</field>
|
||||
<field name="report_name">report_qweb_parameter.test_report_length</field>
|
||||
</record>
|
||||
<template id="test_report_length">
|
||||
<data>
|
||||
<li
|
||||
|
|
|
@ -3,3 +3,5 @@
|
|||
* `Tecnativa <https://www.tecnativa.com>`_:
|
||||
|
||||
* Carlos Roca
|
||||
|
||||
* Iván Antón <ozono@ozonomultimedia.com>
|
||||
|
|
|
@ -22,19 +22,19 @@ class TestReportQWebParameter(common.TransactionCase):
|
|||
}
|
||||
)
|
||||
docs.website = "1234567890" # for avoding that Odoo adds http://
|
||||
rep = report_object.render(docs.ids, False)
|
||||
rep = report_object._render(docs.ids, False)
|
||||
root = ET.fromstring(rep[0])
|
||||
self.assertEqual(root[0].text, "1234567890")
|
||||
self.assertEqual(root[2].text, "1234567890")
|
||||
docs.update({"street": "123456789"})
|
||||
with self.assertRaises(QWebException):
|
||||
report_object.render(docs.ids, False)
|
||||
report_object._render(docs.ids, False)
|
||||
docs.update({"street": "1234567890", "vat": "123456789"})
|
||||
with self.assertRaises(QWebException):
|
||||
report_object.render(docs.ids, False)
|
||||
report_object._render(docs.ids, False)
|
||||
docs.update({"vat": "1234567890", "website": "12345678901"})
|
||||
with self.assertRaises(QWebException):
|
||||
report_object.render(docs.ids, False)
|
||||
report_object._render(docs.ids, False)
|
||||
docs.update({"website": "1234567890", "company_registry": "12345678901"})
|
||||
with self.assertRaises(QWebException):
|
||||
report_object.render(docs.ids, False)
|
||||
report_object._render(docs.ids, False)
|
||||
|
|
Loading…
Reference in New Issue