Odoo Help

0

Error exporting simplified transactional annex in Ecuador Localization

By
Giovanny Vizcaya
on 12/1/15, 8:30 PM 743 views

Greetings, I'm testing Ecuador localization and when I want to export a simplified transactional Annex I get this error:


Odoo Server Error

Traceback (most recent call last):

File "/home/gio666/odoo/openerp/http.py", line 537, in _handle_exception

return super(JsonRequest, self)._handle_exception(exception)

File "/home/gio666/odoo/openerp/http.py", line 574, in dispatch

result = self._call_function(**self.params)

File "/home/gio666/odoo/openerp/http.py", line 310, in _call_function

return checked_call(self.db, *args, **kwargs)

File "/home/gio666/odoo/openerp/service/model.py", line 118, in wrapper

return f(dbname, *args, **kwargs)

File "/home/gio666/odoo/openerp/http.py", line 307, in checked_call

return self.endpoint(*a, **kw)

File "/home/gio666/odoo/openerp/http.py", line 803, in __call__

return self.method(*args, **kw)

File "/home/gio666/odoo/openerp/http.py", line 403, in response_wrap

response = f(*args, **kw)

File "/home/gio666/odoo/addons/web/controllers/main.py", line 948, in call_button

action = self._call_kw(model, method, args, {})

File "/home/gio666/odoo/addons/web/controllers/main.py", line 936, in _call_kw

return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs)

File "/home/gio666/odoo/openerp/api.py", line 250, in wrapper

return old_api(self, *args, **kwargs)

File "/home/gio666/odoo/addons/l10n_ec_withdrawing/wizard/wizard_ats.py", line 286, in act_export_ats

etree.SubElement(ventaEst, 'codEstab').text = j.auth_id.serie_emision

File "lxml.etree.pyx", line 951, in lxml.etree._Element.text.__set__ (src/lxml/lxml.etree.c:46353)

File "apihelpers.pxi", line 695, in lxml.etree._setNodeText (src/lxml/lxml.etree.c:20953)

File "apihelpers.pxi", line 683, in lxml.etree._createTextNode (src/lxml/lxml.etree.c:20829)

File "apihelpers.pxi", line 1391, in lxml.etree._utf8 (src/lxml/lxml.etree.c:27100)

TypeError: Argument must be bytes or unicode, got 'bool'


Why this error? Does it something to do with the line etree.SubElement (ventaEst, 'codEstab'). Text = File j.auth_id.serie_emision in file wizard_ats.py?? 

I'm using odoo 8 in Ubuntu 14.04 LTS

0
Axel Mendoza
On 12/1/15, 10:10 PM

Your error is because j.auth_id.serie_emision is False and you cannot assign that value to an etree element node, you could solve it like this:

etree.SubElement(ventaEst, 'codEstab').text = j.auth_id.serie_emision or ''

or using a conditional expression:

if j.auth_id.serie_emision:
etree.SubElement(ventaEst, 'codEstab').text = j.auth_id.serie_emision

the first line worked, but now i get this error: Error de Datos El sistema generó el XML pero los datos no pasan la validación XSD del SRI. Los errores mas comunes son: * RUC,Cédula o Pasaporte contiene caracteres no válidos. * Números de documentos están duplicados. El siguiente error contiene el identificador o número de documento en conflicto: Element 'IdInformante': [facet 'length'] The value has a length of '5'; this differs from the allowed length of '13'.

Giovanny Vizcaya
on 12/2/15, 11:43 AM

That is another error not related with this post

Axel Mendoza
on 12/2/15, 1:01 PM
0
Giovanny Vizcaya
On 12/2/15, 11:44 AM

that solved the first error ... now i get a new error:


Error de Datos

El sistema generó el XML pero los datos no pasan la validación XSD del SRI.

Los errores mas comunes son:

* RUC,Cédula o Pasaporte contiene caracteres no válidos.

* Números de documentos están duplicados.

El siguiente error contiene el identificador o número de documento en conflicto:

Element 'IdInformante': [facet 'length'] The value has a length of '5'; this differs from the allowed length of '13'.




About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)

Stats

Asked: 12/1/15, 8:30 PM
Seen: 743 times
Last updated: 12/2/15, 11:44 AM