Daily updates from Odoo
Wednesday, September 17, 2025
7 changes · 17.0
Resolved issues and error corrections
This fixes incorrect Spanish translations for Peruvian electronic invoicing and stock-related tariff and withholding fields. Users working in Spanish will see clearer, more accurate labels, reducing confusion in local compliance workflows.
Original PR description
## Issue: The latest `tariff_fraction` entries were not properly translated into Spanish There were also inconsistencies in the translation of some `withhold codes` ## Cause: The `.po` and `.pot` files were not correctly populated In addition, the translation of "Others" in `l10n_pe_withhold_code` conflicted with `l10n_pe_edi_reason_for_transfer__13`, because the `msgid` is the same but not the `msgstr` should be different opw-4741731
Users can no longer accidentally upload documents while viewing the trash folder, even if a slow connection briefly shows the upload option. This prevents upload errors and keeps the document uploader usable after failed upload attempts.
Original PR description
Currently, an error occurs when a user uploads a file in `TRASH`.
Stack Trace:
```
ValueError: invalid literal for int() with base 10: 'TRASH'
File "home/odoo/src/enterprise/saas-17.2/documents/controllers/documents.py", line 132, in upload_document
'folder_id': int(folder_id),
```
The user was not allowed to upload the file to the trash (the upload button was disabled when the user was in the trash folder), but due to the low speed of the internet, the button was visible a few times during this time, and users were able to upload the file after switching the normal folder to trash.
This commit will fix the above issue by not allowing uploads of files when users are in the `TRASH` folder. Also updated is the code to ensure that always reset file input value to ensure the file uploader works after upload fails due to not length or trash folder.
sentry-5565009205The Mail app no longer offers an unsupported company grouping option for alias domains. This prevents users from hitting an error when using the Group By menu, making the view more reliable.
Original PR description
Currently, an exception is generated when the user tries to group by copmany in Alias Domain. Error: `psycopg2.errors.UndefinedColumn: column mail_alias_domain.company_ids does not exist` This is because the search view of the `mail.alias.domain` model is used group by company_ids field, which is One2many. This commit will fix above issue by removing the company_ids from the group since we can't group by records with multiple record set fields. sentry-5774171054
Saving the Statement report in Studio no longer fails when there are no existing statement records to provide a currency. The system now uses the current company's currency as a fallback, helping users work with reports reliably in new databases.
Original PR description
Currently, an exception is generated when the user tries to save the "statement" report in Studio. Steps to produce an error: - Create DB without a demo and install 'web_studio' and 'account_reports' - Open Accounting and click on studio icon - Click Reports > Remove values from searchbar > Open "STATEMENT" report - edit anything > Click on save >>> Error generated This is because line [1] tries to get the display currency from the record (which is the "currency_id" field), but since without demo we do not have any record in account statement, it tries to get value from 'NewId' and no value is available in field 'currency_id'. This commit will fix the above issue by setting the current company currency as display currency if not currency available in record. [1] - https://github.com/odoo/odoo/blob/d1f20d6b71203e6bb4b428ae1bcbb0b76e739f51/odoo/addons/base/models/ir_qweb_fields.py#L512 sentry-5639835599
The Moroccan payroll update process now reloads required partner information before payroll rules are updated. This prevents scheduled payroll data updates from failing if the National Social Security Fund partner record was deleted, improving reliability for payroll administrators.
Original PR description
Currently an exception was generated when the user deleted partner 'National Social Security Fund' and tries to run CRON `Payroll: Update data`.
Error:
`KeyError: ('ir.model.data', <function IrModelData._xmlid_lookup at 0x70b447a20720>, 'l10n_ma_hr_payroll.hr_CNSS_register')`
This is because above CRON tries to update data from a file. Record id "l10n_ma_hr_payroll_rules_employee_cnss" which is used above the partner record reference (see [1]) but the user already deleted the partner.
This commit will fix the above issue by loading partner data before loading payroll rule data. It is always ensured partner data was available before loading payroll rule data.
[1] - https://github.com/odoo/enterprise/blob/348d404ef738e9a4008eda7f4a829b2c00649317/l10n_ma_hr_payroll/data/hr_salary_rule_data.xml#L169
sentry-5877715925Payroll users with Administrator access can now cancel payslips that are marked as done. This fixes an access check that incorrectly required full system administrator status, helping payroll teams complete corrections without unnecessary escalation.
Original PR description
steps to reproduce: ------------------- 1. Install payroll 2. Create a user and grant "Administrator" access to Payroll. 3. Log in as the new user and try to cancel a 'Done' payslip. issue: ------ A UserError is raised: "Cannot cancel a payslip that is done." observation: ------------ A user with Payroll "Administrator" access is unable to cancel a payroll payslip cause of the issue: ------------------- During cancellation, the system checks whether the user is "Admin" instead of verifying if the user has Payroll "Administrator" access. https://github.com/odoo/enterprise/blob/13832d80570956e504e1c09f41acbeb0bc4baedc/hr_payroll/models/hr_payslip.py#L509-L513 solution: ---------- Check that the user has Payroll "Administrator" access. opw-5040029
The Spanish Mod347 tax report now correctly includes withholding tax amounts when calculating report totals. This prevents understated figures for customers or suppliers with withholding taxes, improving the accuracy of Spanish tax reporting.
Original PR description
Withholding taxes should be taken into account in mod347 tax report. Steps: - Create a bill for a spanish customer - Set the amount of 40000, tax 21% and 15% withholding tax - Go to mod347 tax report -> Line "B - Sales of goods and services greater than 3.005,06 €" is showing 42,400.00 instead of 48,400.00 (same goes for other lines with similar configuration) Before this commit, custom engines domains were only including aml with payable or receivable account. With this commit, we include tax lines that are of type 'retencion' in the custom engines domains. opw-4448662