Friday, November 24, 2023
3 changes · 17.0
Resolved issues and error corrections
This update resolves critical issues in Mexican electronic invoice (CFDI) generation when handling complex tax scenarios. It fixes a system crash when processing retention taxes on payment invoices and corrects the payment method field to properly use code 99 for deferred payment invoices instead of incorrectly using the selected payment way. These fixes ensure accurate and reliable CFDI file generation for Mexican tax compliance.
Original PR description
Issue 1: When dealing with retention tax, the payment CFDI leads to a traceback. Issue 2: - Create an invoice - Change the "Payment Way" - Change the invoice due date in order to move the invoice to PPD - Create the CFDI of the invoice => The FormaPago is the selected "Payment Way" instead of 99
This update resolves a memory error that occurred when generating account journal reports with a large number of journals. The system now retrieves journal data more efficiently by starting with journals and filtering out empty ones, rather than loading all transaction lines first. This improvement prevents system slowdowns and crashes when working with extensive journal data.
Original PR description
**[FIX] account_reports: memory error when the journals in the `account_journal_report` are so many.** Changing the query to fetch account_journals and joining account_move_lines to exclude any journals with no lines instead of getting account_move_lines and joining the journals. opw-3583235 Forward-Port-Of: odoo/enterprise#51016
A recent update to manager access rights inadvertently prevented payroll officers from opening the HR Payroll app due to insufficient permissions for viewing employee contracts. This fix restores the necessary access rights so payroll officers can view all employee contracts needed to generate payroll reports and warnings.
Original PR description
In odoo/enterprise#49562 the manager rights were reworked. As a result, payroll officer is no more able to open the app as they get 'read' access error for HR Contract records. This happens because _get_dashboard_warnings is reading the contracts of all the employees and with later changes payroll officer implies hr_contract.group_hr_contract_employee_manager, which has access to only their and subordinate employees' contracts. This commit grants to payroll officer hr_contract.group_hr_contract_manager rights again.