RecursionError when generating edocument invoice without sales or purchases module
When generating an invoice I get the following traceback:
```
Traceback (most recent call last):
File "/trytond/wsgi.py", line 109, in dispatch_request
return endpoint(request, **request.view_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/trytond/protocols/dispatcher.py", line 43, in rpc
return methods.get(request.rpc_method, _dispatch)(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/trytond/wsgi.py", line 75, in wrapper
return func(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/trytond/protocols/wrappers.py", line 197, in wrapper
return func(request, pool, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/trytond/protocols/dispatcher.py", line 196, in _dispatch
result = rpc.result(meth(*c_args, **c_kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/trytond/model/descriptors.py", line 33, in newfunc
return self.func(owner, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/trytond/model/modelview.py", line 742, in wrapper
return func(cls, records, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/trytond/modules/company/ir.py", line 83, in run_once
super(Cron, cls).run_once([cron])
File "/trytond/model/descriptors.py", line 33, in newfunc
return self.func(owner, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/trytond/model/modelview.py", line 742, in wrapper
return func(cls, records, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/trytond/ir/cron.py", line 156, in run_once
getattr(Model, method)()
File "/trytond/modules/account_ro_anaf/account.py", line 340, in send
payload = record.get_payload()
^^^^^^^^^^^^^^^^^^^^
File "/trytond/modules/account_ro_anaf/account.py", line 363, in get_payload
return Doc(self.invoice).render('16B-CII')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/trytond/modules/edocument_uncefact/edocument.py", line 83, in render
.render()
^^^^^^^^
File "/genshi/core.py", line 184, in render
return encode(generator, method=method, encoding=encoding, out=out)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/genshi/output.py", line 59, in encode
return _encode(''.join(list(iterator)))
^^^^^^^^^^^^^^
File "/genshi/output.py", line 243, in __call__
for kind, data, pos in stream:
File "/genshi/output.py", line 674, in __call__
for kind, data, pos in stream:
File "/genshi/output.py", line 779, in __call__
for kind, data, pos in chain(stream, [(None, None, None)]):
File "/genshi/output.py", line 598, in __call__
for ev in stream:
File "/genshi/core.py", line 292, in _ensure
for event in stream:
File "/genshi/core.py", line 292, in _ensure
for event in stream:
File "/trytond/modules/edocument_uncefact/edocument.py", line 47, in remove_comment
for kind, data, pos in stream:
File "/genshi/template/base.py", line 641, in _include
for event in stream:
File "/genshi/template/markup.py", line 326, in _match
for event in stream:
File "/genshi/template/base.py", line 621, in _flatten
stream = _apply_directives(data[1], data[0], ctxt, vars)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/genshi/template/base.py", line 275, in _apply_directives
stream = directives[0](iter(stream), directives[1:], ctxt, **vars)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/genshi/template/directives.py", line 410, in __call__
value = _eval_expr(self.expr, ctxt, vars)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/genshi/template/base.py", line 290, in _eval_expr
retval = expr.evaluate(ctxt)
^^^^^^^^^^^^^^^^^^^
File "/genshi/template/eval.py", line 160, in evaluate
return eval(self.code, _globals, {'__data__': data})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/trytond/modules/edocument_uncefact/template/16B-CII/CrossIndustryInvoice.xml", line 103, in <Expression 'this.ship_to_trade_party'>
<ram:ShipToTradeParty py:if="this.ship_to_trade_party">
File "/genshi/template/eval.py", line 301, in lookup_attr
val = getattr(obj, key)
^^^^^^^^^^^^^^^^^
File "/trytond/model/model.py", line 317, in __getattr__
return self._values[name]
^^^^^^^^^^^^
File "/trytond/model/model.py", line 317, in __getattr__
return self._values[name]
^^^^^^^^^^^^
File "/trytond/model/model.py", line 317, in __getattr__
return self._values[name]
^^^^^^^^^^^^
[Previous line repeated 946 more times]
File "/trytond/model/model.py", line 314, in __getattr__
if name.startswith('__') and name.endswith('__'):
^^^^^^^^^^^^^^^^^^^^^
RecursionError: maximum recursion depth exceeded while calling a Python object
Fault: maximum recursion depth exceeded while calling a Python object
```
issue