Odoo Help

Welcome!

This community 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.

0

Error exporting simplified transactional annex in Ecuador Localization

By
Giovanny Vizcaya
on 12/1/15, 8:30 PM 425 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

--Axel Mendoza--
10205
| 7 7 8
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full time employee trying to understand what to do an how

Reach me at aekroft@gmail.com

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'.




Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

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