Daily updates from Odoo
Friday, November 8, 2024
23 changes · master
Enhancements to existing features
This update adapts automated tests to a changed messaging initialization route. It helps keep accounting and studio test coverage aligned with the platform so future releases remain reliable without changing user-facing behavior.
Original PR description
https://github.com/odoo/odoo/pull/179352
The bank account synchronization area has had its automated tests updated to use Odoo's newer testing approach. This helps keep quality checks maintainable and reliable without changing day-to-day user functionality.
Original PR description
Update legacy tests importing mail/test_utils.js to use HOOT instead of Qunit. Task-3818666
The VoIP and OnSIP VoIP test suites were updated to use Odoo's newer testing framework. This is an internal quality improvement that helps keep the modules maintainable without changing the user-facing VoIP experience.
Original PR description
Purpose of this PR is to convert remove QUnit tests which rely on `mail/test_utils` to hoot. Part of task-3818666
This update modernizes how Odoo enforces key data rules and database indexes across many business modules. It helps improve data consistency and reliability behind the scenes, with little expected day-to-day impact for users.
Original PR description
Replace virtual constraints. odoo/odoo#175783
Resolved issues and error corrections
The spreadsheet document tests were adjusted to match a recent change in how chart trend lines are calculated. This prevents unreliable test failures for an unrealistic chart setup and helps keep spreadsheet chart functionality stable.
Original PR description
Since o-spreadsheet/commit/9909fa98d data points are normalized to compute the trend line. Those 2 tests were computing a 2nd order polynomial trend line based on 2 data points only, which doesn't really makes sense. With only 2 points, the normalized labels become [0, 1]. The matrix is of the form x1 x2 x1^2 x2^2 it gives 0 1 0 1 with [0, 1] as the labels. This matrix is not invertible since the two lines are the same and the determinant is 0.
Features or functions removed from Odoo
This change removes remaining support for an already-removed comparison menu in manufacturing work orders and cohort analysis views. It simplifies the affected screens behind the scenes and keeps Enterprise modules aligned with the main Odoo interface changes.
Original PR description
The comparison menu is removed in https://github.com/odoo/odoo/pull/186454. Here we simplify a bit the component MrpDisplay and the cohort view to no longer accept a prop "comparison" (unused in the case of MrpDisplay). Note that we do not thoroughly refactor the cohort view since there are ongoing discussions on refactor it using the spreadsheet library. Task ID: 4307873
Code cleanup and technical improvements
This update reorganizes Point of Sale component files into clearer dedicated folders across related POS add-ons. It does not introduce new business functionality, but it should make future maintenance and updates easier for development teams.
Original PR description
Reorganization of all `components` files into a specific folder. Task-id: 4290514
Miscellaneous changes
Store the partner one by one is very costly. Since all the partner return by _mail_get_partners will end up in the store, we can store them all at once This improve the time for get_today_call_activities from 25000ms to around 700ms for one of the worse case (thousands of partners to fetch) Forward-Port-Of: odoo/enterprise#68118
Original PR description
Store the partner one by one is very costly. Since all the partner return by _mail_get_partners will end up in the store, we can store them all at once This improve the time for get_today_call_activities from 25000ms to around 700ms for one of the worse case (thousands of partners to fetch) Forward-Port-Of: odoo/enterprise#68118
Version: 16.0+ Issue: When we make commission on a subscription sale order, the subscription end and start dates are not passed through the order lines -> invoice lines and we run into an error when trying to create the corresponding purchase order. Purpose of this PR: If there are no subscription dates on the invoice lines then we do not calculate the length of the subscription in months and instead create the purchase order line description just as the commission for the corres
Original PR description
Version: 16.0+ Issue: When we make commission on a subscription sale order, the subscription end and start dates are not passed through the order lines -> invoice lines and we run into an error when…
Version: 16.0+ Issue: When we make commission on a subscription sale order, the subscription end and start dates are not passed through the order lines -> invoice lines and we run into an error when trying to create the corresponding purchase order. Purpose of this PR: If there are no subscription dates on the invoice lines then we do not calculate the length of the subscription in months and instead create the purchase order line description just as the commission for the corresponding subscription. Steps to reproduce on runbot: install partner_commission set up a subscription with a referrer and a commission plan create invoice for the subscription try to register the payment for the invoice error raised regarding a max function with no args Notes: looking to investigate further why the subscription dates are not passed from the subscription to the order lines to the invoice lines in 17.0+ field name is changed from `subscription_end_date` to `deferred_end_date` (same for `start` date), will have to adjust in fw ports opw-4240937 Forward-Port-Of: odoo/enterprise#73465 Forward-Port-Of: odoo/enterprise#73428
Before this fix, clicking any item in the dropdown under "Tools" caused a traceback when scrolling vertically or horizontally. This commit ensures that we check if the canvas is rendered before proceeding with the code, preventing the error. task-4212762 Forward-Port-Of: odoo/enterprise#70839
Original PR description
Before this fix, clicking any item in the dropdown under "Tools" caused a traceback when scrolling vertically or horizontally. This commit ensures that we check if the canvas is rendered before proceeding with the code, preventing the error. task-4212762 Forward-Port-Of: odoo/enterprise#70839
This PR corrects incorrect documentation links in the Helpdesk Team form view. Steps to reproduce: 1) Install the Helpdesk module. 2) Open any Helpdesk Team or create a new one. 3) Check the documentation links in the following sections: - E-learning - Visibility - Email Alias - Community Forum 4) Notice the incorrect or broken links. **Note**: We do not need to update the .pot file. task-4266660 Forward-Port-Of: odoo/enterprise#73510 Forward-Port-Of: odoo/enterpri
Original PR description
This PR corrects incorrect documentation links in the Helpdesk Team form view. Steps to reproduce: 1) Install the Helpdesk module. 2) Open any Helpdesk Team or create a new one. 3) Check the documentation links in the following sections: - E-learning - Visibility - Email Alias - Community Forum 4) Notice the incorrect or broken links. **Note**: We do not need to update the .pot file. task-4266660 Forward-Port-Of: odoo/enterprise#73510 Forward-Port-Of: odoo/enterprise#72248
**Steps to reproduce:** - Install l10n_es_reports and Sales - Create a SO for a Spanish customer - Create an invoice from the SO - Check "AEAT data" tab of the invoice **Issue:** "Type for mod 347" is not set. It should be set to "Regular operation" as it is done when creating an invoice manually. **Cause:** The default is handled by a function that depends on another field. However that other field is not set when computing the default value and the result is always False. **So
Original PR description
**Steps to reproduce:** - Install l10n_es_reports and Sales - Create a SO for a Spanish customer - Create an invoice from the SO - Check "AEAT data" tab of the invoice **Issue:** "Type for mod 347" is not set. It should be set to "Regular operation" as it is done when creating an invoice manually. **Cause:** The default is handled by a function that depends on another field. However that other field is not set when computing the default value and the result is always False. **Solution:** There were a function for the default (_default_mod_349_invoice_type) and an onchange on partner (_onchange_partner_id_set_347_invoice_type). Both of them were checking different conditions. The fix is merging these 2 methods by converting the field into a computed stored field where both conditions are handled. opw-4194030 Forward-Port-Of: odoo/enterprise#72958
before this commit, if user tries to open/generate WIP entry for manufacturing without recording the end time in the time tracking inside the work order a traceback is shown to user * create a manufacturing order that generate work order * in the work orders generated, start a work order * now click on POST WIP accounting entry from action * traceback is shown after this commit, no traceback wont be shown in the above scenario Forward-Port-Of: odoo/enterprise#72345
Original PR description
before this commit, if user tries to open/generate WIP entry for manufacturing without recording the end time in the time tracking inside the work order a traceback is shown to user * create a manufacturing order that generate work order * in the work orders generated, start a work order * now click on POST WIP accounting entry from action * traceback is shown after this commit, no traceback wont be shown in the above scenario Forward-Port-Of: odoo/enterprise#72345
The issue: When duplicating a quality check, the name and control_date fields were copied, resulting in duplicated values. How to reproduce the issue: -Create a quality check -Pass the quality check -Duplicate the quality check Explanation: The name and control_date fields were duplicated during the copy process, preventing the create method from assigning the next sequence number. opw-4197697 Forward-Port-Of: odoo/enterprise#71372
Original PR description
The issue: When duplicating a quality check, the name and control_date fields were copied, resulting in duplicated values. How to reproduce the issue: -Create a quality check -Pass the quality check -Duplicate the quality check Explanation: The name and control_date fields were duplicated during the copy process, preventing the create method from assigning the next sequence number. opw-4197697 Forward-Port-Of: odoo/enterprise#71372
In this commit : - we add the pseudo selector :not(:visible) to invisible elements with the aim to remove _legacyVisible from findTrigger method in tour_step_automatic.js. - we also add "hover" action to make the element of the next step visible instead of using tricks to make it visible. Forward-Port-Of: odoo/enterprise#73479
Original PR description
In this commit : - we add the pseudo selector :not(:visible) to invisible elements with the aim to remove _legacyVisible from findTrigger method in tour_step_automatic.js. - we also add "hover" action to make the element of the next step visible instead of using tricks to make it visible. Forward-Port-Of: odoo/enterprise#73479
Prior to this commit, the alert displayed in planning for shifts-switch, time off conflict and shifts conflict was too big, leaving a lot of empty space within the div. This commit sets some bootstrap classes to fix the issue. Task: 4224786 Forward-Port-Of: odoo/enterprise#72289
Original PR description
Prior to this commit, the alert displayed in planning for shifts-switch, time off conflict and shifts conflict was too big, leaving a lot of empty space within the div. This commit sets some bootstrap classes to fix the issue. Task: 4224786 Forward-Port-Of: odoo/enterprise#72289
Install "l10n_uk" Accounting / Reporting / Statement Reports / Tax Return Actions / Send to HMRC Issue: Traceback will raise ``` ValueError: Invalid field l10n_uk.vat.obligation.currency_table_period_key in leaf ('currency_table_period_key', '=', '18A1') ``` It occurs after e598fcb48b5e4f0126406a4008f175a88528ba85 replaced occurrences of `period_key` with `currency_table_period_key` opw-4283511 Forward-Port-Of: odoo/enterprise#73481
Original PR description
Install "l10n_uk"
Accounting / Reporting / Statement Reports / Tax Return
Actions / Send to HMRC
Issue: Traceback will raise
```
ValueError: Invalid field l10n_uk.vat.obligation.currency_table_period_key in leaf ('currency_table_period_key', '=', '18A1')
```
It occurs after e598fcb48b5e4f0126406a4008f175a88528ba85 replaced occurrences of `period_key` with `currency_table_period_key`
opw-4283511
Forward-Port-Of: odoo/enterprise#73481### Steps to reproduce: - Go in Accounting > Reporting > Tax Report - Select "Group By: Tax > Account" - A warning should appear on the tax lines ### Cause: In the consistency check the net value retrieved is an empty string so the calculation is done with a net_value of 0 and an error is detected. ### Solution: If the net_value retrieved is not valid, the consistency check is not done. opw-4263695 Forward-Port-Of: odoo/enterprise#73319
Original PR description
### Steps to reproduce: - Go in Accounting > Reporting > Tax Report - Select "Group By: Tax > Account" - A warning should appear on the tax lines ### Cause: In the consistency check the net value retrieved is an empty string so the calculation is done with a net_value of 0 and an error is detected. ### Solution: If the net_value retrieved is not valid, the consistency check is not done. opw-4263695 Forward-Port-Of: odoo/enterprise#73319
When the value to store into a generic id was zero (which can typically happen when doing a non-relational groupby), None was stored into the generic id instead. On groupby lines, this lead the unfold of that line to behave weirdly and not show the proper results. The reason was that, in Python, doing 0 == False gives True. So, when doing 0 in (False, None), we ended up with a True result. Forward-Port-Of: odoo/enterprise#72808
Original PR description
When the value to store into a generic id was zero (which can typically happen when doing a non-relational groupby), None was stored into the generic id instead. On groupby lines, this lead the unfold of that line to behave weirdly and not show the proper results. The reason was that, in Python, doing 0 == False gives True. So, when doing 0 in (False, None), we ended up with a True result. Forward-Port-Of: odoo/enterprise#72808
Reproduce: 1/ Create documents and assign a company an admin (`group_erp_manager`) doesn't have access to 2/ As that admin, open the Documents app 3/ Go to "Home" and expect an Access Error There was a mismatch between `user_permission`'s search and compute methods for admins. We also take the opportunity to fix the SHARED (and clean COMPANY) search panel `CategoryDomain`s as odoobot's ownership wasn't used to make documents visible in COMPANY (therefore not in SHARED) on its ow
Original PR description
Reproduce: 1/ Create documents and assign a company an admin (`group_erp_manager`) doesn't have access to 2/ As that admin, open the Documents app 3/ Go to "Home" and expect an Access Error There was a mismatch between `user_permission`'s search and compute methods for admins. We also take the opportunity to fix the SHARED (and clean COMPANY) search panel `CategoryDomain`s as odoobot's ownership wasn't used to make documents visible in COMPANY (therefore not in SHARED) on its own. A test is added. Task-4241620 Forward-Port-Of: odoo/enterprise#71462
With this PR, `filtered` will be removed from `_get_out_of_fiscal_year_reversed_moves` method and added to the domain for improve performance, and also some minor changes will be made in `_l10n_in_get_fiscal_year_start_date`. Previous PR: https://github.com/odoo/enterprise/pull/66824 task-3915664 Forward-Port-Of: odoo/enterprise#73483 Forward-Port-Of: odoo/enterprise#73309
Original PR description
With this PR, `filtered` will be removed from `_get_out_of_fiscal_year_reversed_moves` method and added to the domain for improve performance, and also some minor changes will be made in `_l10n_in_get_fiscal_year_start_date`. Previous PR: https://github.com/odoo/enterprise/pull/66824 task-3915664 Forward-Port-Of: odoo/enterprise#73483 Forward-Port-Of: odoo/enterprise#73309
This issue is coming from importing a CSV File in the 'account.bank.statement.line' model was caught by a sentry. Because if the CSV file does not have two columns, which are 'debit' and 'credit', that time getting error is 'amount' is not in the list. step to reproduce- - Install the Accounting. - Go to Dashboard > click on import statement button of Bank card - Upload the statement ([bank statement](https://drive.google.com/file/d/1s_a3Ym27QKRDh63BwPb-3P4g4kjmbH2l/view?usp=drive_link))
Original PR description
This issue is coming from importing a CSV File in the 'account.bank.statement.line' model was caught by a sentry. Because if the CSV file does not have two columns, which are 'debit' and 'credit', that time getting error is 'amount' is not in the list. step to reproduce- - Install the Accounting. - Go to Dashboard > click on import statement button of Bank card - Upload the statement ([bank statement](https://drive.google.com/file/d/1s_a3Ym27QKRDh63BwPb-3P4g4kjmbH2l/view?usp=drive_link)) - After, click on Test button - Error will be generated.  Sentry: -3931578971 Forward-Port-Of: odoo/enterprise#37315
Before this commit, the attachment_view_move_line component was not adapted to the new changes done in the mail_popout_service. This commit solves this problem. task-4275364 Forward-Port-Of: odoo/enterprise#73386
Original PR description
Before this commit, the attachment_view_move_line component was not adapted to the new changes done in the mail_popout_service. This commit solves this problem. task-4275364 Forward-Port-Of: odoo/enterprise#73386