Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error al exportar archivo BOE AEAT 111 #375

Closed
jesusestu opened this issue Jul 5, 2016 · 4 comments
Closed

error al exportar archivo BOE AEAT 111 #375

jesusestu opened this issue Jul 5, 2016 · 4 comments

Comments

@jesusestu
Copy link

Hola.

Cuando creo el modelo 111 no puedo exportarlo a BOE porque me da este error.

La version de 'l10n_es_aeat' es la 8.0.1.7.0 y la de 'l10n_es_aeat_mod111' es la 8.0.1.2.0.
Agradeceré cualquier ayuda.

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 543, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 580, in dispatch
result = self._call_function(*_self.params)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 316, in _call_function
return checked_call(self.db, *args, *_kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/service/model.py", line 118, in wrapper
return f(dbname, _args, *_kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 313, in checked_call
return self.endpoint(_a, *_kw)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 809, in call
return self.method(_args, *_kw)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 409, in response_wrap
response = f(_args, *_kw)
File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 948, in call_button
action = self._call_kw(model, method, args, {})
File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 936, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, _args, *_kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 268, in wrapper
return old_api(self, _args, *_kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 399, in old_api
result = method(recs, _args, *_kwargs)
File "/opt/odoo/apps/oca/l10n_es_aeat/wizard/export_to_boe.py", line 193, in action_get_file
contents += self.action_get_file_from_config(report)
File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 266, in wrapper
return new_api(self, _args, *_kwargs)
File "/opt/odoo/apps/oca/l10n_es_aeat/wizard/export_to_boe.py", line 234, in action_get_file_from_config
return self._export_config(report, report.export_config)
File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 266, in wrapper
return new_api(self, _args, *_kwargs)
File "/opt/odoo/apps/oca/l10n_es_aeat/wizard/export_to_boe.py", line 241, in _export_config
contents += self._export_line_process(obj, line)
File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 266, in wrapper
return new_api(self, _args, *_kwargs)
File "/opt/odoo/apps/oca/l10n_es_aeat/wizard/export_to_boe.py", line 273, in _export_line_process
field_val = EXPRESSION_PATTERN.sub(merge, line.expression)
File "/opt/odoo/apps/oca/l10n_es_aeat/wizard/export_to_boe.py", line 255, in merge
'context': self.env.context.copy(),
File "/usr/lib/python2.7/dist-packages/openerp/tools/safe_eval.py", line 314, in safe_eval
return eval(c, globals_dict, locals_dict)
File "", line 1, in
ValueError: "'l10n.es.aeat.mod111.report' object has no attribute 'result_type'" while evaluating
"(object.result_type == 'D' and object.compensate and 'C') or object.result_type"

@jesusestu
Copy link
Author

Si no se le pone Plantilla de exportación, da este error.

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 543, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 580, in dispatch
result = self._call_function(*_self.params)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 316, in _call_function
return checked_call(self.db, *args, *_kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/service/model.py", line 118, in wrapper
return f(dbname, _args, *_kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 313, in checked_call
return self.endpoint(_a, *_kw)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 809, in call
return self.method(_args, *_kw)
File "/usr/lib/python2.7/dist-packages/openerp/http.py", line 409, in response_wrap
response = f(_args, *_kw)
File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 948, in call_button
action = self._call_kw(model, method, args, {})
File "/usr/lib/python2.7/dist-packages/openerp/addons/web/controllers/main.py", line 936, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, _args, *_kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 268, in wrapper
return old_api(self, _args, *_kwargs)
File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 399, in old_api
result = method(recs, _args, *_kwargs)
File "/opt/odoo/apps/oca/l10n_es_aeat/wizard/export_to_boe.py", line 196, in action_get_file
contents += self._get_formatted_declaration_record(report)
File "/usr/lib/python2.7/dist-packages/openerp/api.py", line 266, in wrapper
return new_api(self, _args, *_kwargs)
File "/opt/odoo/apps/oca/l10n_es_aeat_mod111/wizard/export_mod111_to_boe.py", line 51, in _get_formatted_declaration_record
fields.Date.from_string(report.fiscalyear_id.date_start).year, 4)
File "/opt/odoo/apps/oca/l10n_es_aeat/wizard/export_to_boe.py", line 59, in _formatString
text = unicode(text.upper())
AttributeError: 'int' object has no attribute 'upper'

@jesusestu
Copy link
Author

Si cambio la línea 59 de archivo /opt/odoo/apps/oca/l10n_es_aeat/wizard/export_to_boe.py por:

    # text = unicode(text.upper())
    text = unicode(str(text).upper())

y después restauro odoo (service odoo restart).

funciona.

@cubells
Copy link
Member

cubells commented Jul 14, 2016

@pedrobaeza
Copy link
Member

Solucionado con el parche adecuado en 222a53c

crimoniv pushed a commit to diagramsoftware/l10n-spain that referenced this issue Jul 16, 2018
pedrobaeza added a commit to sygel-technology/l10n-spain that referenced this issue Oct 23, 2020
ValentinVinagre pushed a commit to sygel-technology/l10n-spain that referenced this issue Dec 16, 2021
pedrobaeza added a commit to ramiadavid/l10n-spain that referenced this issue Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants