Daily updates from Odoo
Thursday, March 7, 2024
20 changes · master
Enhancements to existing features
The data merge test coverage was updated to match a change in invoice handling: customer invoices and credit notes are now secured when they are sent rather than when they are posted. This keeps automated checks aligned with the current business process and helps avoid false test failures.
Original PR description
Now the customer invoices and credit notes are hashed upon sending, not upon posting. Tests should be adjusted accordingly. See also: odoo/odoo#152467 Part of: task-3695695
This update improves how the Mexican EDI extension locates its internal files, especially in setups that use linked or customized addon paths. It helps prevent path-related failures without changing day-to-day functionality for users.
Original PR description
Replace outdated realpath usage with odoo tools.file_open. Allows file_open to locate file from addons path rather than looking up through realpath. This will resolve potential issues with realpath not finding the proper path of files in certain situations (like a symlink). Worth noting that file_open uses abspath instead of realpath anyway. opw-3745052
The Avatax geolocation screen now hides coordinate calculation buttons for contact entries that belong to a parent contact and have a specific contact type. This reduces confusion by preventing users from seeing actions that are not relevant in those situations.
Original PR description
This PR makes invisible coordinates computation buttons when having a parent and type in contact. Task-3336288
This update removes obsolete UTF-8 coding comments from Python files across the affected accounting modules. It does not change product behavior, but keeps the codebase cleaner and easier to maintain.
Original PR description
Since the `coding: utf-8` comment at the start of python files is no longer useful, this commit removes them.
Resolved issues and error corrections
Opening a linked resource from the Documents inspector no longer causes an error. This helps users access related records from documents without interruption.
Original PR description
**Steps to reproduce:** - Select a document to open the document inspector.(say Employment Contract.pdf) - Click on the resource link of that document.(located below folder) **Issue:** When a user…
**Steps to reproduce:**
- Select a document to open the document inspector.(say Employment Contract.pdf)
- Click on the resource link of that document.(located below folder)
**Issue:**
When a user tries to open a document resource from the documents inspector, it leads to a traceback.
**Cause:**
The issue has been faced since https://github.com/odoo/odoo/pull/149906/commits/bc4ebf44e224a9e4dec0c924f835af52086ba4b6 as it introduces some code to handle the fields of type "many2one_reference" in 'utils.js', thus changing the returned value in case of res_id.
(i.e. Instead of simply returning the 'value' of resId, it returns an object { resId: value })
As a result, validateProps throws an error due to an invalid type of res_id received.
**Fix:**
This commit tweaks the arguments of the orm call in `onClickResModel` method to ensure that the res_id passed
is of type 'number'.
Task: [3764083](https://www.odoo.com/web#id=3764083&menu_id=4722&cids=2&action=333&active_id=10888&model=project.task&view_type=form)Code cleanup and technical improvements
The pull request updates several automated product tours to use the newer testing selector approach instead of older jQuery-based patterns. This is an internal cleanup that should make tests more consistent and maintainable without changing day-to-day user workflows.
Original PR description
In this commit : - Tour Compiler uses now Hoot selectors instead of jQuery selectors. - jQuery selectors from tours trigger (extra_trigger and others) have been so adapted to be compatible with Hoot selectors. - Most of uses of jQuery in step.run() has been replaced by native or hoot-dom helpers. task~3600484 https://github.com/odoo/odoo/pull/154182
This update reorganizes automated tests across several Odoo apps so shared test helpers are imported and reused more consistently. It does not change business functionality, but it helps keep future testing work cleaner and easier to maintain.
Original PR description
https://github.com/odoo/odoo/pull/156722
Miscellaneous changes
*: account_reports, account_sepa_direct_debit --- This PR contains two commits. The first one fixes wrong domains when auditing the aged reports by adjusting which journal types the aml's that are displayed can have and by adjusting the dates that are used. The second one fixes a missing filter for SEPA Mandates in the Amounts to Settle view when sepa is installed. --- odoo: https://github.com/odoo/odoo/pull/148476 task-3640027 Forward-Port-Of: odoo/enterprise#54137
Original PR description
*: account_reports, account_sepa_direct_debit --- This PR contains two commits. The first one fixes wrong domains when auditing the aged reports by adjusting which journal types the aml's that are displayed can have and by adjusting the dates that are used. The second one fixes a missing filter for SEPA Mandates in the Amounts to Settle view when sepa is installed. --- odoo: https://github.com/odoo/odoo/pull/148476 task-3640027 Forward-Port-Of: odoo/enterprise#54137
Steps: - create a shift recurrency every week and save - go back to the shift, and set another date - select "edit: all shifts" and save Issue: All shifts are set to the same date. Cause: We find all shift of the recurrence and apply them the same values. Fix: Pop those field from the value. Then, depending on the unit of the recurrence, we compute which day of the week/month the new date is. Apply it to all shifts, and if we don't have the 2 dates, recalculate the start based o
Original PR description
Steps: - create a shift recurrency every week and save - go back to the shift, and set another date - select "edit: all shifts" and save Issue: All shifts are set to the same date. Cause: We find all shift of the recurrence and apply them the same values. Fix: Pop those field from the value. Then, depending on the unit of the recurrence, we compute which day of the week/month the new date is. Apply it to all shifts, and if we don't have the 2 dates, recalculate the start based on the new end or inversely. opw-3571081 Forward-Port-Of: odoo/enterprise#57983 Forward-Port-Of: odoo/enterprise#51784
In a picking, when a destination is scanned, if the scanned line is not complete, the line is splitted: the processed qty goes to the scanned destination and the remaining qty still goes to the previous expected destination. That said, if the scanned destination is the move line expected location, the line is not split, which can be annoying in some case. How to reproduce: - Active multi location; - Create a receipt for 4x product A and confirm it; - Open the receipt in the Barcode App; -
Original PR description
In a picking, when a destination is scanned, if the scanned line is not complete, the line is splitted: the processed qty goes to the scanned destination and the remaining qty still goes to the…
In a picking, when a destination is scanned, if the scanned line is not complete, the line is splitted: the processed qty goes to the scanned destination and the remaining qty still goes to the previous expected destination. That said, if the scanned destination is the move line expected location, the line is not split, which can be annoying in some case. How to reproduce: - Active multi location; - Create a receipt for 4x product A and confirm it; - Open the receipt in the Barcode App; - Scan 2x product A and then scan WH-STOCK as the destination -> Nothing happens. If the picker wants to move 2 product A in WH/Stock and 2 product A in Shelf 1, they have no easy way to do it if they scan WH-Stock first. If they scan Shelf 1 first, then the product A line will be splitted and they will get: - 2/2 product A going to WH/Stock/Shelf 1; - 0/2 product A going to WH/Stock. But if they scan WH-Stock first, they will stay with only one line: - 2/4 product A going to WH/Stock. In such case, no other choice than create a new line through the "Add Line" button (form view) and so, the reservation won't be split between the two lines. OPW-3774095 Forward-Port-Of: odoo/enterprise#57892
After some time, Amazon anonymized the buyer information and don't send it anymore in the calls. This shouldn't raise an error due to the missing data, but synchronize the order nonetheless. opw-3761649 Forward-Port-Of: odoo/enterprise#58099 Forward-Port-Of: odoo/enterprise#57999
Original PR description
After some time, Amazon anonymized the buyer information and don't send it anymore in the calls. This shouldn't raise an error due to the missing data, but synchronize the order nonetheless. opw-3761649 Forward-Port-Of: odoo/enterprise#58099 Forward-Port-Of: odoo/enterprise#57999
Bridge module to make invoices coming from amazon simplified, as you don't get the customer's tax id through via amazon. opw-3679325 Forward-Port-Of: odoo/enterprise#57713
Original PR description
Bridge module to make invoices coming from amazon simplified, as you don't get the customer's tax id through via amazon. opw-3679325 Forward-Port-Of: odoo/enterprise#57713
### Steps to reproduce * install `l10n_es_reports` * switch to a Spanish company * ensure that the partner linked to your Spanish company has a bank account * open the tax report (MOD111, MOD115 or MOD303) * on the top left, click 'BOE' > 'Generate BOE' You should be met with the following error: "Please select an IBAN account". The 'Direct Debit Account' field should not be required. Another issue is that even if your company has some bank accounts defined, none of them will be li
Original PR description
### Steps to reproduce * install `l10n_es_reports` * switch to a Spanish company * ensure that the partner linked to your Spanish company has a bank account * open the tax report (MOD111, MOD115 or…
### Steps to reproduce * install `l10n_es_reports` * switch to a Spanish company * ensure that the partner linked to your Spanish company has a bank account * open the tax report (MOD111, MOD115 or MOD303) * on the top left, click 'BOE' > 'Generate BOE' You should be met with the following error: "Please select an IBAN account". The 'Direct Debit Account' field should not be required. Another issue is that even if your company has some bank accounts defined, none of them will be listed in the 'Direct Debit Account' field. ### Cause In `Mod111And115And303CommonBOEWizard`, `partner_bank_id` (Direct Debit Account) depends on `company_id` through `company_partner_id`. However, since `company_id` is not in the view, its associated default value will only be calculated when the wizard is saved. Before that, `company_id` will be empty, which will cause `partner_bank_id` to be empty as well. https://github.com/odoo/enterprise/blob/f512de0bcd32ab65bd3c91ffc7e7955c491d24da/l10n_es_reports/wizard/aeat_boe_export_wizards.py#L40-L42 The reason it works well in 16.4 is because before d2e099597c845e21f12bc0868c36ac5d4cf89b36, the wizard was initiated using `create()`, so the default values were calculated before displaying the wizard. https://github.com/odoo/enterprise/blob/59e9d1f9d705773091f86ccf5c6ba7bac9feaf5d/l10n_es_reports/models/aeat_tax_reports.py#L124-L136 opw-3719150 opw-3756722 Forward-Port-Of: odoo/enterprise#56938
How to reproduce: - Open the app document - Ensure the trash is empty - Select a document from any workspace (not too small so that the displayed size in MB is different from 0) - Move it to the trash - Open the trash - Select the document and click on delete in the inspector - Confirm the permanent deletion The inspector displays 0 documents but the size is different from 0 MB. This fixes the error by reloading the model forcing the re-computation of the size. Technical notes: no t
Original PR description
How to reproduce: - Open the app document - Ensure the trash is empty - Select a document from any workspace (not too small so that the displayed size in MB is different from 0) - Move it to the trash - Open the trash - Select the document and click on delete in the inspector - Confirm the permanent deletion The inspector displays 0 documents but the size is different from 0 MB. This fixes the error by reloading the model forcing the re-computation of the size. Technical notes: no test has been added as the tour that test the deletion uses small documents which prevents to add assertion about the size (as the size is 0 even when a document is present in the trash). Task-3637482 Forward-Port-Of: odoo/enterprise#53808
### Steps to reproduce * install `account_reports` * make sure you have multiple companies * create a new horizontal group with the following values: * Reports: General Ledger * Field: Company, Domain: [] * open the general ledger and apply the horizontal group you just made * attempt to unfold a line You should be met with a traceback: `KeyError: 'currency_id'` ### Cause Some possibly empty values are not accounted for. In this case, we arrive here with `eval_dict[column
Original PR description
### Steps to reproduce * install `account_reports` * make sure you have multiple companies * create a new horizontal group with the following values: * Reports: General Ledger * Field: Company, Domain: [] * open the general ledger and apply the horizontal group you just made * attempt to unfold a line You should be met with a traceback: `KeyError: 'currency_id'` ### Cause Some possibly empty values are not accounted for. In this case, we arrive here with `eval_dict[column['column_group_key']]` being an empty dict, which produces the traceback at line `618`. https://github.com/odoo/enterprise/blob/74000d6d5c8435bcaad93f7baf143abdf8593064/account_reports/models/account_general_ledger.py#L617-L621 Depending on the horizontal group, `init_bal_by_col_group[column['column_group_key']]` can also be `None`, which can cause issue at line `621` opw-3746643 Forward-Port-Of: odoo/enterprise#57220
Description of the issue/feature this commit addresses: There is no localization for Zambia. --- Desired behavior after this commit is merged: This commit adds the base package of the Zambian localization including: - Default Settings - Chart of Accounts - Taxes - Fiscal Positions - Reports (BS, P&L, Tax Report) --- Community PR: https://github.com/odoo/odoo/pull/150134 task-3391861 Forward-Port-Of: odoo/enterprise#54707
Original PR description
Description of the issue/feature this commit addresses: There is no localization for Zambia. --- Desired behavior after this commit is merged: This commit adds the base package of the Zambian localization including: - Default Settings - Chart of Accounts - Taxes - Fiscal Positions - Reports (BS, P&L, Tax Report) --- Community PR: https://github.com/odoo/odoo/pull/150134 task-3391861 Forward-Port-Of: odoo/enterprise#54707
Forward-Port-Of: odoo/enterprise#58132
Original PR description
Forward-Port-Of: odoo/enterprise#58132
Steps to reproduce =================== - Open the documents module. - thumbnail of the some pdfs are not displayed. Technical =================== As we made some changes https://github.com/odoo/enterprise/pull/49111 here related to thumbnail thumbnail_status for the 'application/pdf;base64' type pdfs are set to be false instead of 'client_generated'. After this PR =================== thumbnail for the 'application/pdf;base64' mimetype pdfs will be generated. Task-3753929 Forward
Original PR description
Steps to reproduce =================== - Open the documents module. - thumbnail of the some pdfs are not displayed. Technical =================== As we made some changes https://github.com/odoo/enterprise/pull/49111 here related to thumbnail thumbnail_status for the 'application/pdf;base64' type pdfs are set to be false instead of 'client_generated'. After this PR =================== thumbnail for the 'application/pdf;base64' mimetype pdfs will be generated. Task-3753929 Forward-Port-Of: odoo/enterprise#57682
Community: https://github.com/odoo/odoo/pull/155239 Forward-Port-Of: odoo/enterprise#57381
Original PR description
Community: https://github.com/odoo/odoo/pull/155239 Forward-Port-Of: odoo/enterprise#57381
When the user presses the `Alt` key in the Knowledge editor, there is no hotkey assigned to the button "Generate an Article with AI" located in the wysiwyg helper. This commit addresses the issue by defining a hotkey for that button. For that button, we will use the "G" key to refer to "Generate". task-3777661 Forward-Port-Of: odoo/enterprise#57366
Original PR description
When the user presses the `Alt` key in the Knowledge editor, there is no hotkey assigned to the button "Generate an Article with AI" located in the wysiwyg helper. This commit addresses the issue by defining a hotkey for that button. For that button, we will use the "G" key to refer to "Generate". task-3777661 Forward-Port-Of: odoo/enterprise#57366