Tuesday, January 31, 2023
2 changes
Resolved issues and error corrections
This change prevents incorrect period calculations when the Trimester monthly report option is used for Spanish BOE 349 tax reports. It helps ensure refund records are generated with the right reporting period and year, reducing the risk of reporting errors.
Original PR description
If the "Trimester monthly report" option is enabled when generating a BOE 349 tax report, it reduces `date_to` in the `options` dict by 1 month. If later we try to calculate the period and year from those modified values, that will fail in the trimester case because `_get_mod_period_and_year` is expecting 3 months instead of 2. To avoid this, we pass the period and year into `_write_type2_refund_records` as arguments so the values don't have to be recalculated again. This wasn't done in the original bug fix in https://github.com/odoo/enterprise/pull/36228 to avoid changing the function signature. opw-3131030
The Luxembourg tax reporting test was updated to reflect the current 2023 tax rates used by the OSS module. This helps keep automated checks aligned with the latest tax setup and prevents false test failures.
Original PR description
In https://github.com/odoo/odoo/commit/e7edd71a3a4d8d7297c07f44b6b701052f2c5b7d the LU taxes in the OSS module where updated in the odoo repo in 14.0, but in 15.0 a test was added in the enterprise repo, still using the old taxes. This change updates the test to use the new taxes for 2023. task-3159138 Related: https://github.com/odoo/odoo/pull/111286