Saturday, March 29, 2025
3 changes · master
Miscellaneous changes
### Steps to reproduce: - Accounting > Dashboard > Bank > Import Statement - Select a QIF file with a transaction having a total of 0 - Traceback ### Cause: The QIF file parser (`_parse_bank_statement_file`) does not return `unique_import_id` for transactions. In [`_create_bank_statements`](https://github.com/odoo/enterprise/blob/316b7bdc7781d5d72d91430f74de35fdafb0bf84/account_bank_statement_import/models/account_journal.py#L261-L269) when the amount is 0, the code tries to read `line_va
Original PR description
### Steps to reproduce: - Accounting > Dashboard > Bank > Import Statement - Select a QIF file with a transaction having a total of 0 - Traceback ### Cause: The QIF file parser (`_parse_bank_statement_file`) does not return `unique_import_id` for transactions. In [`_create_bank_statements`](https://github.com/odoo/enterprise/blob/316b7bdc7781d5d72d91430f74de35fdafb0bf84/account_bank_statement_import/models/account_journal.py#L261-L269) when the amount is 0, the code tries to read `line_vals['unique_import_id']` so an error is raised. ### Solution: The read is done to store the skipped lines in `ignored_statement_lines_import_ids`. This variable is then only used to get the number of skipped lines. https://github.com/odoo/enterprise/blob/316b7bdc7781d5d72d91430f74de35fdafb0bf84/account_bank_statement_import/models/account_journal.py#L291 The fix is to increment a counter instead of storing the lines. opw-4656142 Forward-Port-Of: odoo/enterprise#81944
**How to reproduce:** - Open an appointment type, open its schedule. - Click on a cell The duration of the meeting depends on the gantt scale and you end up having meetings that last 24 hours. **Technical reason:** - Start and stop columns are checked, if they are not same then default duration context is removed. - Due to changes in web_gantt stop column's value is now changed. https://github.com/odoo/enterprise/pull/78855 **After this PR:** The appointment duration will now corre
Original PR description
**How to reproduce:** - Open an appointment type, open its schedule. - Click on a cell The duration of the meeting depends on the gantt scale and you end up having meetings that last 24 hours. **Technical reason:** - Start and stop columns are checked, if they are not same then default duration context is removed. - Due to changes in web_gantt stop column's value is now changed. https://github.com/odoo/enterprise/pull/78855 **After this PR:** The appointment duration will now correctly match its default duration. Task-4655323 Forward-Port-Of: odoo/enterprise#81983
This PR fixes non-deterministic issues with a unit test in the appointment module. The issue was coming from the gantt range being separately from the mounting of the view. This could sometimes be a problem, as the second "get_gantt_data" RPC could return *after* the helper responsible for selecting the range called a `runAllTimers` that would drastically increase the current time, and thus affect the RPC payload. The fix here is to include the desired range directly in the view arch,
Original PR description
This PR fixes non-deterministic issues with a unit test in the appointment module. The issue was coming from the gantt range being separately from the mounting of the view. This could sometimes be a…
This PR fixes non-deterministic issues with a unit test in the appointment module. The issue was coming from the gantt range being separately from the mounting of the view. This could sometimes be a problem, as the second "get_gantt_data" RPC could return *after* the helper responsible for selecting the range called a `runAllTimers` that would drastically increase the current time, and thus affect the RPC payload. The fix here is to include the desired range directly in the view arch, instead of selecting the range manually from the UI. Furthermore, when trying to reproduce the non-deterministic behavior of the test mentioned above by slowing down RPCs, other gantt tests showed constitently failing results due to a poor architecture relying on animation frames instead of waiting for network calls. These tests have been fixed preventively to avoid potential timing issues. Fixes runbot issues: - [159865](https://runbot.odoo.com/odoo/runbot.build.error/159865) - [161300](https://runbot.odoo.com/odoo/runbot.build.error/161300) - [161490](https://runbot.odoo.com/odoo/runbot.build.error/161490) Community: https://github.com/odoo/odoo/pull/203472 Forward-Port-Of: odoo/enterprise#82362 Forward-Port-Of: odoo/enterprise#82189