Daily updates from Odoo
Friday, September 19, 2025
4 changes · master
Resolved issues and error corrections
This update fixes internal test failures in the Mexico electronic invoicing sales module by giving the test user the needed Sales permissions. It helps keep automated checks reliable without changing any customer-facing business behavior.
Original PR description
The tests `test_global_discount` and `test_down_payment` in `l10n_mx_edi_sale` were failing with:
AccessError: You are not allowed to create 'Sales Order' (sale.order) records.
This happened because `mx_external_setup` runs with a user that does not belong to any Sales group. Both tests explicitly create Sale Orders and advance payment wizards, which require Sales ACLs.
This change ensures the test user has the `sales_team.group_sale_salesman` group in `setUpClass`, so Sales Orders can be created normally. No business logic is modified, only test stabilization for the MX localization.
[RB-232559](https://runbot.odoo.com/odoo/error/232559)
Forward-Port-Of: odoo/enterprise#94911The automatic cleanup process now skips documents linked to signed agreements, preventing background errors when trash is cleared. Users will still be informed if they try to manually delete protected signed documents, preserving important records and avoiding system noise.
Original PR description
Currently an error occurs when auto vacuum tries to clear documents linked to `sign_document`. **Steps to replicate:** * Install `documents_sign` with demo data. * Go to documents > Move Employment…
Currently an error occurs when auto vacuum tries to clear documents linked to `sign_document`. **Steps to replicate:** * Install `documents_sign` with demo data. * Go to documents > Move Employment contracts to trash * Trash > Try to to delete employment contract you will see error in terminal. Similarly error will be produced by the Auto-Vacuum process when it attempts to delete it after the configured deletion delay. **Error:** `ForeignKeyViolation: update or delete on table 'ir_attachment' violates foreign key constraint 'sign_document_attachment_id_fkey' on table 'sign_document' DETAIL: Key (id)=(1164) is still referenced from table 'sign_document'.` **Root cause:** * At [1], the `sign.document` model was introduced, which prevents the deletion of sign documents. As a result, attempting to delete them due to [2] will cause an error. **Solution:** * Update the `_get_gc_clear_bin_domain` to ensure that the Auto-Vacuum process skips sign documents. * This will still throw an Validation and ForeignKey error as expected when the user tries to delete it from the GUI letting them know it cannot be deleted. [1]: https://github.com/odoo/enterprise/commit/4254542e8fb4ce3b2b9b46c624d86f7fcac8df7b#diff-deebbcccf829fd1804d145c5c7140b482801644bd948639f77caa310b18b8120 [2]: https://github.com/odoo/enterprise/blob/828d47f9ad1d5e396b074c404287799574a6d692/sign/models/sign_document.py#L44 sentry-6842360375 Forward-Port-Of: odoo/enterprise#95086 Forward-Port-Of: odoo/enterprise#93818
This fixes an issue where already-used serial numbers could reappear when users manually added delivery lines. The change helps prevent selecting unavailable stock, reducing mistakes in warehouse operations and improving inventory accuracy.
Original PR description
Steps to reproduce the bug: Create a storable product “P” tracked by serial number Create a receipt for 100 units with serial numbers sn.001 to sn.100 Create a delivery for 10 units, Odoo assigns serial numbers from sn.001 to sn.010, Validate Create a delivery for 3 units, Odoo assigns serial numbers from sn.011 to sn.013, Delete the 3 move lines, Add a line: you will see again the serial numbers sn.001 to sn.010 in the list Origin: This pr : https://github.com/odoo/odoo/pull/216035 removed the 'on_hand' & 'in_stock' without removing their uses (search_default_*) Fix: Ensure a correct domain when adding a line. opw-5075144 Forward-Port-Of: odoo/enterprise#95032
This update keeps subscription-related website sales pages aligned with recent changes in the main Odoo website sales flow. It helps ensure customers can continue using subscription checkout and related pages without disruption after the platform update.
Original PR description
Forward-Port-Of: odoo/enterprise#95078