Monday, August 12, 2024
1 change
Resolved issues and error corrections
This fix resolves a critical error that prevented users from generating BOE (Boletin Oficial del Estado) documents in the Spanish Tax Report (Mod 349). The issue occurred when processing reversed bills from EU vendors, causing the system to crash. Users can now successfully generate tax reports without encountering errors.
Original PR description
Before this commit:
Steps
1) Install l10n_es_reports
2) Switch to ES company
3) Create a EU vendor (any except SPAIN) + add TIN
4) Create a bill with last month date
5) Reverse that bill with current month date
6) Go to Tax reports
7) Switch to Tax Report (Mod 349) (ES)
8) Choose date range: This Month
9) Generate BOE
=> It shows an error with a traceback `/l10n_es_reports/models/aeat_tax_reports.py", line 1257, in _write_type2_refund_records
previous_report_amount = invoice_line_data['columns'][0]['no_format']
TypeError: 'NoneType' object is not subscriptable`
After this commit:
BOE in mod349 is generated properly without errors
opw-4055702
Forward-Port-Of: odoo/enterprise#68096