[MIG] report_qweb_parameter: Migration to 16.0
parent
41fcda22c2
commit
bd9f0a12b2
|
@ -2,10 +2,13 @@
|
|||
Report QWeb Parameter
|
||||
=====================
|
||||
|
||||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
..
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:6e50557d8d49cab3485b6aa968d1dbc2a8d55f1fd8cdc34b3b269db65edf9693
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
||||
:target: https://odoo-community.org/page/development-status
|
||||
|
@ -14,16 +17,16 @@ Report QWeb Parameter
|
|||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github
|
||||
:target: https://github.com/OCA/reporting-engine/tree/15.0/report_qweb_parameter
|
||||
:target: https://github.com/OCA/reporting-engine/tree/16.0/report_qweb_parameter
|
||||
:alt: OCA/reporting-engine
|
||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||
:target: https://translation.odoo-community.org/projects/reporting-engine-15-0/reporting-engine-15-0-report_qweb_parameter
|
||||
:target: https://translation.odoo-community.org/projects/reporting-engine-16-0/reporting-engine-16-0-report_qweb_parameter
|
||||
:alt: Translate me on Weblate
|
||||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
||||
:target: https://runbot.odoo-community.org/runbot/143/15.0
|
||||
:alt: Try me on Runbot
|
||||
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
||||
:target: https://runboat.odoo-community.org/builds?repo=OCA/reporting-engine&target_branch=16.0
|
||||
:alt: Try me on Runboat
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
|
||||
This module allows you to add new parameters on QWeb reports.
|
||||
Currently, we have defined a field maximum on a report and a validation of
|
||||
|
@ -50,8 +53,8 @@ Bug Tracker
|
|||
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/reporting-engine/issues>`_.
|
||||
In case of trouble, please check there if your issue has already been reported.
|
||||
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
||||
`feedback <https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_qweb_parameter%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
||||
`feedback <https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_qweb_parameter%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
|
||||
Do not contact contributors directly about support or help with technical issues.
|
||||
|
||||
|
@ -87,6 +90,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|||
mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.
|
||||
|
||||
This module is part of the `OCA/reporting-engine <https://github.com/OCA/reporting-engine/tree/15.0/report_qweb_parameter>`_ project on GitHub.
|
||||
This module is part of the `OCA/reporting-engine <https://github.com/OCA/reporting-engine/tree/16.0/report_qweb_parameter>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
{
|
||||
"name": "Report QWeb Parameter",
|
||||
"version": "15.0.1.0.0",
|
||||
"version": "16.0.1.0.0",
|
||||
"license": "AGPL-3",
|
||||
"summary": """
|
||||
Add new parameters for qweb templates in order to reduce field length
|
||||
|
|
|
@ -34,6 +34,19 @@
|
|||
t-raw="docs[0].company_registry"
|
||||
t-if="docs[0].company_registry"
|
||||
/>
|
||||
<li
|
||||
name="raw_length"
|
||||
t-minlength="10"
|
||||
t-length="10"
|
||||
t-out="docs[0].vat"
|
||||
t-if="docs[0].vat"
|
||||
/>
|
||||
<li
|
||||
name="raw_maxlength"
|
||||
t-maxlength="10"
|
||||
t-out="docs[0].company_registry"
|
||||
t-if="docs[0].company_registry"
|
||||
/>
|
||||
</data>
|
||||
</template>
|
||||
</odoo>
|
||||
|
|
|
@ -22,12 +22,14 @@ msgid "Length Report"
|
|||
msgstr "Longitud de l'informe"
|
||||
|
||||
#. module: report_qweb_parameter
|
||||
#. odoo-python
|
||||
#: code:addons/report_qweb_parameter/models/ir_qweb.py:0
|
||||
#, python-format
|
||||
msgid "Length cannot be less than %s"
|
||||
msgstr "La longitut no pot ser menor que %s"
|
||||
|
||||
#. module: report_qweb_parameter
|
||||
#. odoo-python
|
||||
#: code:addons/report_qweb_parameter/models/ir_qweb.py:0
|
||||
#, python-format
|
||||
msgid "Length cannot be more than %s"
|
||||
|
|
|
@ -23,12 +23,14 @@ msgid "Length Report"
|
|||
msgstr "Longitud del informe"
|
||||
|
||||
#. module: report_qweb_parameter
|
||||
#. odoo-python
|
||||
#: code:addons/report_qweb_parameter/models/ir_qweb.py:0
|
||||
#, python-format
|
||||
msgid "Length cannot be less than %s"
|
||||
msgstr "La longitud no puede ser menor a %s"
|
||||
|
||||
#. module: report_qweb_parameter
|
||||
#. odoo-python
|
||||
#: code:addons/report_qweb_parameter/models/ir_qweb.py:0
|
||||
#, python-format
|
||||
msgid "Length cannot be more than %s"
|
||||
|
|
|
@ -24,12 +24,14 @@ msgid "Length Report"
|
|||
msgstr "Longueur du rapport "
|
||||
|
||||
#. module: report_qweb_parameter
|
||||
#. odoo-python
|
||||
#: code:addons/report_qweb_parameter/models/ir_qweb.py:0
|
||||
#, python-format
|
||||
msgid "Length cannot be less than %s"
|
||||
msgstr "La longueur du rapport ne peut pas être inférieure à %s"
|
||||
|
||||
#. module: report_qweb_parameter
|
||||
#. odoo-python
|
||||
#: code:addons/report_qweb_parameter/models/ir_qweb.py:0
|
||||
#, python-format
|
||||
msgid "Length cannot be more than %s"
|
||||
|
|
|
@ -22,12 +22,14 @@ msgid "Length Report"
|
|||
msgstr "Lunghezza Report"
|
||||
|
||||
#. module: report_qweb_parameter
|
||||
#. odoo-python
|
||||
#: code:addons/report_qweb_parameter/models/ir_qweb.py:0
|
||||
#, python-format
|
||||
msgid "Length cannot be less than %s"
|
||||
msgstr "La lunghezza non può essere meno di %s"
|
||||
|
||||
#. module: report_qweb_parameter
|
||||
#. odoo-python
|
||||
#: code:addons/report_qweb_parameter/models/ir_qweb.py:0
|
||||
#, python-format
|
||||
msgid "Length cannot be more than %s"
|
||||
|
|
|
@ -22,12 +22,14 @@ msgid "Length Report"
|
|||
msgstr "Relatório de Comprimento"
|
||||
|
||||
#. module: report_qweb_parameter
|
||||
#. odoo-python
|
||||
#: code:addons/report_qweb_parameter/models/ir_qweb.py:0
|
||||
#, python-format
|
||||
msgid "Length cannot be less than %s"
|
||||
msgstr "Comprimento não pode ser superior a %s"
|
||||
|
||||
#. module: report_qweb_parameter
|
||||
#. odoo-python
|
||||
#: code:addons/report_qweb_parameter/models/ir_qweb.py:0
|
||||
#, python-format
|
||||
msgid "Length cannot be more than %s"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 15.0\n"
|
||||
"Project-Id-Version: Odoo Server 16.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
|
@ -19,12 +19,14 @@ msgid "Length Report"
|
|||
msgstr ""
|
||||
|
||||
#. module: report_qweb_parameter
|
||||
#. odoo-python
|
||||
#: code:addons/report_qweb_parameter/models/ir_qweb.py:0
|
||||
#, python-format
|
||||
msgid "Length cannot be less than %s"
|
||||
msgstr ""
|
||||
|
||||
#. module: report_qweb_parameter
|
||||
#. odoo-python
|
||||
#: code:addons/report_qweb_parameter/models/ir_qweb.py:0
|
||||
#, python-format
|
||||
msgid "Length cannot be more than %s"
|
||||
|
|
|
@ -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, indent):
|
||||
def _compile_directive_esc(self, el, compile_context, level):
|
||||
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,28 @@ 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, indent)
|
||||
return super()._compile_directive_esc(el, compile_context, level)
|
||||
|
||||
def _compile_directive_raw(self, el, options, indent):
|
||||
def _compile_directive_out(self, el, compile_context, level):
|
||||
min_value = el.attrib.pop("t-minlength", False)
|
||||
max_value = el.attrib.pop("t-maxlength", False)
|
||||
if min_value or max_value:
|
||||
el.attrib["t-out"] = (
|
||||
'docs.env["ir.qweb"].check_length('
|
||||
+ el.attrib["t-out"]
|
||||
+ ", "
|
||||
+ (min_value or "False")
|
||||
+ ", "
|
||||
+ (max_value or "False")
|
||||
+ ")"
|
||||
)
|
||||
if "t-length" in el.attrib:
|
||||
tlength = el.attrib.pop("t-length")
|
||||
el.attrib["t-out"] = el.attrib["t-out"] + "[:" + tlength + "]"
|
||||
return super()._compile_directive_out(el, compile_context, level)
|
||||
|
||||
def _compile_directive_raw(self, el, compile_context, level):
|
||||
# TODO: t-raw is deprecated, can it be removed?
|
||||
min_value = el.attrib.pop("t-minlength", False)
|
||||
max_value = el.attrib.pop("t-maxlength", False)
|
||||
if min_value or max_value:
|
||||
|
@ -50,4 +69,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, indent)
|
||||
return super()._compile_directive_raw(el, compile_context, level)
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
|
||||
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
|
||||
<title>Report QWeb Parameter</title>
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger (goodger@python.org)
|
||||
:Id: $Id: html4css1.css 7952 2016-07-26 18:15:59Z milde $
|
||||
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
|
||||
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
||||
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
|
@ -366,8 +366,10 @@ ul.auto-toc {
|
|||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:6e50557d8d49cab3485b6aa968d1dbc2a8d55f1fd8cdc34b3b269db65edf9693
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/reporting-engine/tree/15.0/report_qweb_parameter"><img alt="OCA/reporting-engine" src="https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/reporting-engine-15-0/reporting-engine-15-0-report_qweb_parameter"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/143/15.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/reporting-engine/tree/16.0/report_qweb_parameter"><img alt="OCA/reporting-engine" src="https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/reporting-engine-16-0/reporting-engine-16-0-report_qweb_parameter"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/reporting-engine&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This module allows you to add new parameters on QWeb reports.
|
||||
Currently, we have defined a field maximum on a report and a validation of
|
||||
maximal and minimal size.
|
||||
|
@ -378,18 +380,18 @@ length and format must be validated in several fields in order to send an invoic
|
|||
<p><strong>Table of contents</strong></p>
|
||||
<div class="contents local topic" id="contents">
|
||||
<ul class="simple">
|
||||
<li><a class="reference internal" href="#usage" id="id1">Usage</a></li>
|
||||
<li><a class="reference internal" href="#bug-tracker" id="id2">Bug Tracker</a></li>
|
||||
<li><a class="reference internal" href="#credits" id="id3">Credits</a><ul>
|
||||
<li><a class="reference internal" href="#authors" id="id4">Authors</a></li>
|
||||
<li><a class="reference internal" href="#contributors" id="id5">Contributors</a></li>
|
||||
<li><a class="reference internal" href="#maintainers" id="id6">Maintainers</a></li>
|
||||
<li><a class="reference internal" href="#usage" id="toc-entry-1">Usage</a></li>
|
||||
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-2">Bug Tracker</a></li>
|
||||
<li><a class="reference internal" href="#credits" id="toc-entry-3">Credits</a><ul>
|
||||
<li><a class="reference internal" href="#authors" id="toc-entry-4">Authors</a></li>
|
||||
<li><a class="reference internal" href="#contributors" id="toc-entry-5">Contributors</a></li>
|
||||
<li><a class="reference internal" href="#maintainers" id="toc-entry-6">Maintainers</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="usage">
|
||||
<h1><a class="toc-backref" href="#id1">Usage</a></h1>
|
||||
<h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
|
||||
<ol class="arabic simple">
|
||||
<li>Add a t-length attribute on report templates fields that will truncate the field</li>
|
||||
<li>Add a t-minlength attribute on report template fields that will check the min length</li>
|
||||
|
@ -397,23 +399,23 @@ length and format must be validated in several fields in order to send an invoic
|
|||
</ol>
|
||||
</div>
|
||||
<div class="section" id="bug-tracker">
|
||||
<h1><a class="toc-backref" href="#id2">Bug Tracker</a></h1>
|
||||
<h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
|
||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/reporting-engine/issues">GitHub Issues</a>.
|
||||
In case of trouble, please check there if your issue has already been reported.
|
||||
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
||||
<a class="reference external" href="https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_qweb_parameter%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
||||
<a class="reference external" href="https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_qweb_parameter%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||
</div>
|
||||
<div class="section" id="credits">
|
||||
<h1><a class="toc-backref" href="#id3">Credits</a></h1>
|
||||
<h1><a class="toc-backref" href="#toc-entry-3">Credits</a></h1>
|
||||
<div class="section" id="authors">
|
||||
<h2><a class="toc-backref" href="#id4">Authors</a></h2>
|
||||
<h2><a class="toc-backref" href="#toc-entry-4">Authors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Creu Blanca</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="contributors">
|
||||
<h2><a class="toc-backref" href="#id5">Contributors</a></h2>
|
||||
<h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
|
||||
<ul>
|
||||
<li><p class="first">Enric Tobella <<a class="reference external" href="mailto:etobella@creublanca.es">etobella@creublanca.es</a>></p>
|
||||
</li>
|
||||
|
@ -429,13 +431,13 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
|||
</ul>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
<h2><a class="toc-backref" href="#id6">Maintainers</a></h2>
|
||||
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
|
||||
<p>This module is maintained by the OCA.</p>
|
||||
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
||||
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||
mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/reporting-engine/tree/15.0/report_qweb_parameter">OCA/reporting-engine</a> project on GitHub.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/reporting-engine/tree/16.0/report_qweb_parameter">OCA/reporting-engine</a> project on GitHub.</p>
|
||||
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -5,14 +5,14 @@ import xml.etree.ElementTree as ET
|
|||
|
||||
from odoo.tests import common
|
||||
|
||||
from odoo.addons.base.models.qweb import QWebException
|
||||
from odoo.addons.base.models.ir_qweb import QWebException
|
||||
|
||||
|
||||
class TestReportQWebParameter(common.TransactionCase):
|
||||
def test_qweb_parameter(self):
|
||||
report_name = "report_qweb_parameter.test_report_length"
|
||||
report_obj = self.env["ir.actions.report"]
|
||||
report_object = report_obj._get_report_from_name(report_name)
|
||||
report_object = report_obj
|
||||
docs = self.env["res.company"].create(
|
||||
{
|
||||
"name": "Test company",
|
||||
|
@ -22,19 +22,20 @@ class TestReportQWebParameter(common.TransactionCase):
|
|||
}
|
||||
)
|
||||
docs.website = "1234567890" # for avoding that Odoo adds http://
|
||||
rep = report_object._render(docs.ids, False)
|
||||
rep = report_object._render(report_name, docs.ids, False)
|
||||
root = ET.fromstring(rep[0])
|
||||
self.assertEqual(root[0].text, "1234567890")
|
||||
self.assertEqual(root[2].text, "1234567890")
|
||||
self.assertEqual(root[4].text, "1234567890")
|
||||
docs.update({"street": "123456789"})
|
||||
with self.assertRaises(QWebException):
|
||||
report_object._render(docs.ids, False)
|
||||
report_object._render(report_name, docs.ids, False)
|
||||
docs.update({"street": "1234567890", "vat": "123456789"})
|
||||
with self.assertRaises(QWebException):
|
||||
report_object._render(docs.ids, False)
|
||||
report_object._render(report_name, docs.ids, False)
|
||||
docs.update({"vat": "1234567890", "website": "12345678901"})
|
||||
with self.assertRaises(QWebException):
|
||||
report_object._render(docs.ids, False)
|
||||
report_object._render(report_name, docs.ids, False)
|
||||
docs.update({"website": "1234567890", "company_registry": "12345678901"})
|
||||
with self.assertRaises(QWebException):
|
||||
report_object._render(docs.ids, False)
|
||||
report_object._render(report_name, docs.ids, False)
|
||||
|
|
Loading…
Reference in New Issue