Tuesday, June 10, 2025
2 changes · saas-18.1
Resolved issues and error corrections
Odoo now shows a clear column-level warning when an imported date or datetime value is mapped to a field that cannot accept it, such as External ID. This prevents the import test from crashing and helps users correct spreadsheet mappings before importing data.
Original PR description
Currently, an error occurs when the user attempts to import a `Datetime` object into a field that is not of type Datetime (e.g., `External ID`). Steps to replicate: - Install Accounting and Import…
Currently, an error occurs when the user attempts to import a `Datetime` object into a field that is not of type Datetime (e.g., `External ID`). Steps to replicate: - Install Accounting and Import Invoices through the file attached. - On any date field select `External ID` and click Test. Error: `TypeError: argument of type 'datetime.date' is not iterable` This error occurs due to a recent change introduced in version saas-18.1 [PR](https://github.com/odoo/odoo/pull/206876), where `Datetime` objects are now passed directly [1] instead of being converted to string(18.0 [2]). This change has led to multiple issues during data processing. This commit resolves the issue by preemptively raising column-level warnings for fields with incompatible data types (e.g.,importing a Date into an External ID column), preventing errors before they occur. [1]-https://github.com/odoo/odoo/blob/d000cf0be02253af1ac1beb6d54b46dcdeac3648/addons/base_import/models/base_import.py#L480-L484 [2]-https://github.com/odoo/odoo/blob/752ba2927e0b61cd6315e5c780a5292a6e99fe17/addons/base_import/models/base_import.py#L479-L483 [Journal Entry (account.move) (25) (1).xlsx](https://github.com/user-attachments/files/20339804/Journal.Entry.account.move.25.1.xlsx) sentry-6604789067, 6591445640, 6604916781, 6596056524, 6589051928 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This fix prevents certain action dialogs from getting stuck when a user chooses an option that opens another view instead of refreshing the current one. It improves reliability in form and list views by avoiding unnecessary reloads that could leave dialogs frozen or trigger errors.
Original PR description
In form and list views, the callback given to the CogMenu to reload the view when the clicked cog menu action was done, didn't check the `noReload` flag. Typically, this flag is set to true when…
In form and list views, the callback given to the CogMenu to reload the view when the clicked cog menu action was done, didn't check the `noReload` flag. Typically, this flag is set to true when we're leaving to another action. However, since [1], and especially [2], this caused an issue as the reloaded view was destroyed while it was being reloaded, so the reload promise was never resolved. As a consequence, we didn't reach the code that actually closes the dialog [3], as `await onClose?.(closeParams)` never resolved. The faulty behavior could be observed in Employee, open Audrey Peterson, click on the Delete cog menu action, and in the dialog, click on See Timesheets. That dialog was then never closed, and trying to close it manually triggered the "Component is destroyed" error, as it always tried to execute the reload callback. [1] https://github.com/odoo/odoo/pull/202512 [2] https://github.com/odoo/odoo/pull/202512/commits/d606be75c44fccf0b1ddf5216892f1d4b7162686 [3] https://github.com/odoo/odoo/pull/202512/commits/d606be75c44fccf0b1ddf5216892f1d4b7162686#diff-552aefb62246b1f4fe6a2607ec8f0a01773e53de2d68293266b38bc99c5cb56dR318 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr