-
-
Notifications
You must be signed in to change notification settings - Fork 542
[16.0][FIX] l10n_es_facturae: The city field in the partner is required for the FacturaE process. If the user does not provide it, document generation fails and module crashes. #4130
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
Conversation
Hi @etobella, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/ocabot merge patch
Llévalo por favor a 17
What a great day to merge this nice PR. Let's do it! |
@pedrobaeza your merge command was aborted due to failed check(s), which you can inspect on this commit of 16.0-ocabot-merge-pr-4130-by-pedrobaeza-bump-patch. After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red. |
@herminioelx no me había dado cuenta que el pre-commit no lo tienes correcto: https://github.com/OCA/maintainer-tools/wiki/Install-pre-commit |
No tengo ese software y tampoco entiendo que hay mal en el código. ¿El literal en la llamada a ValidationError es muy 'largo'? |
Ya te he puesto la referencia de cómo instalarlo, pero si no mira en el error, y te pone cómo debería estar el código formateado y replícalo manualmente. |
Ponlo por favor en un solo commit. |
8de72de
to
838700d
Compare
… the FacturaE process. If the user does not provide it, document generation fails and module crashes.
838700d
to
3b26358
Compare
/ocabot merge patch |
This PR looks fantastic, let's merge it! |
Congratulations, your PR was merged at 3e8a763. Thanks a lot for contributing to OCA. ❤️ |
Sorry, my previous pull request had a confusing number of commits.
The change involves modifying the validation process, just to check the existence of some value in the city field for Spanish partners.
Part of the error message in Odoo:
File "/opt/addons/l10n-spain/l10n_es_facturae/reports/report_facturae.py", line 39, in generate_report
xml_facturae, content_type = super().generate_report(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/addons/reporting-engine/report_xml/reports/report_report_xml_abstract.py", line 53, in generate_report
result_bin = ir_report._render_template(ir_report.report_name, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/odoo/odoo/addons/base/models/ir_actions_report.py", line 661, in _render_template
return view_obj._render_template(template, values).encode()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/odoo/odoo/addons/base/models/ir_ui_view.py", line 2135, in _render_template
return self.env['ir.qweb']._render(template, values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/odoo/odoo/tools/profiler.py", line 294, in _tracked_method_render
return method_render(self, template, values, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/odoo/odoo/addons/base/models/ir_qweb.py", line 593, in _render
result = ''.join(rendering)
^^^^^^^^^^^^^^^^^^
File "<1758>", line 34, in template_1758
File "<1758>", line 23, in template_1758_content
File "<1757>", line 3040, in template_1757
File "<1757>", line 3022, in template_1757_content
File "<1757>", line 319, in template_1757_t_call_0
File "<1755>", line 341, in template_1755
File "<1755>", line 142, in template_1755_content
File "<1754>", line 170, in template_1754
File "<1754>", line 116, in template_1754_content
File "<1756>", line 327, in template_1756
odoo.addons.base.models.ir_qweb.QWebException: Error while render the template
TypeError: 'bool' object is not subscriptable
Template: l10n_es_facturae.address_contact
Path: /t/AddressInSpain/Town
Node: