Thursday, April 25, 2024
18 changes · master
Enhancements to existing features
This update documents hidden fields that still need to remain in system views and helps identify ones that are no longer necessary. It improves maintainability and reduces unused configuration without changing day-to-day user workflows.
Original PR description
Since https://github.com/odoo/odoo/pull/137031 the invisible fields are add automatically (invisible and readonly) if they are used by python expressions in views (invisible, required, readonly, context, domain...). The mandatory invisible field must be commented just after the field tag. The comment must indicate what is the technical requirement to be present. The goal is to clean all views, improve the comprehention of the addons and remove dead code.
The Documents activity list now gives the “Request a Document” button the same hover styling as related activity actions. This creates a more consistent and polished experience for users managing document requests.
Original PR description
Give the "Request a Document" button of the activity list the same style on hover as the activity elements. Task-3862008
Code cleanup and technical improvements
This update modernizes how Odoo's automated product tours simulate clicks and drag-and-drop actions, making tests more consistent and easier to maintain. It also simplifies the testing helper API by removing rarely useful focus and blur actions, with no expected impact on day-to-day users.
Miscellaneous changes
To reproduce: - Create a report with just one line, with code line_1_1. Give it an aggregation expression, cross_report, with formula "line_2_1.balance" - Create another report, containing a single line with code line_2_1. Give it two expressions: - One aggregation, with formula="14.0" (hardcoded fixed value), and subformula "if_other_expr_above(line_2_1.dudu, EUR(0))" - Another expression of any engine labelled 'dudu' ==> Try opening the first report; it loads forever. This i
Original PR description
To reproduce: - Create a report with just one line, with code line_1_1. Give it an aggregation expression, cross_report, with formula "line_2_1.balance" - Create another report, containing a single…
To reproduce:
- Create a report with just one line, with code line_1_1. Give it an aggregation expression, cross_report, with formula "line_2_1.balance"
- Create another report, containing a single line with code line_2_1. Give it two expressions: - One aggregation, with formula="14.0" (hardcoded fixed value), and subformula "if_other_expr_above(line_2_1.dudu, EUR(0))"
- Another expression of any engine labelled 'dudu'
==> Try opening the first report; it loads forever.
This is because the bound expression is only searched in the expressions of the active report ; not in the expressions loaded from other reports. In our case, the aggregation needing the bound is from the second report, so the bound belongs to its report as well. The looping occurs because that value, since it's not present in the first report's evaluated data, is considered as not yet computed, and the computation is continuously delayed at the end of the treatment queue, causing it to never become empty.
Forward-Port-Of: odoo/enterprise#61334
Forward-Port-Of: odoo/enterprise#58339Original PR description
In this commit, click event and drag_and_drop_native events in web_tour/static/src/tour_service/tour_utils.js have been changed to use hoot events. Also, blur and focus utils have been removed from RunningTourActionHelper because there usages are not relevant and complicate the understanding of the API. https://github.com/odoo/odoo/pull/162031
Steps to Reproduce: - Install Timesheets app - Navigate to All timesheets from the header menu - Click on kanban view Issue: - Timer is present in the All timesheets Kanban view Causes: - Timer is present in the All timesheet kanban view because this view is inherited in my time sheets. Solution: - Using the context that is only used in MyTimeSheet Action window to hide the timer header (my_timesheet_display_timer) task-3741260 Forward-Port-Of: odoo/enterprise#61349 Fo
Original PR description
Steps to Reproduce: - Install Timesheets app - Navigate to All timesheets from the header menu - Click on kanban view Issue: - Timer is present in the All timesheets Kanban view Causes: - Timer is present in the All timesheet kanban view because this view is inherited in my time sheets. Solution: - Using the context that is only used in MyTimeSheet Action window to hide the timer header (my_timesheet_display_timer) task-3741260 Forward-Port-Of: odoo/enterprise#61349 Forward-Port-Of: odoo/enterprise#56581
## Description: Previously, the list reinsertion dialog overlooked converting user input to integers, causing JavaScript to treat numbers as strings. Consequently, unintended concatenation occurred, resulting in excessive record insertion. This PR addresses the issue by enforcing integer conversion on user input, ensuring precise record insertion. Task ID: [3833909](https://www.odoo.com/web#id=3833909&cids=2&menu_id=4720&action=333&active_id=2328&model=project.task&view_type=form) Forw
Original PR description
## Description: Previously, the list reinsertion dialog overlooked converting user input to integers, causing JavaScript to treat numbers as strings. Consequently, unintended concatenation occurred, resulting in excessive record insertion. This PR addresses the issue by enforcing integer conversion on user input, ensuring precise record insertion. Task ID: [3833909](https://www.odoo.com/web#id=3833909&cids=2&menu_id=4720&action=333&active_id=2328&model=project.task&view_type=form) Forward-Port-Of: odoo/enterprise#61357 Forward-Port-Of: odoo/enterprise#60642
Steps to reproduce: 1. Configure Sendcloud shipping with pick-up location 2. Go to website, use the shipping method and select a pick-up location 3. Go to the backend, confirm the sale order and validate the delivery 4. Get Error from Sendcloud that the `house_number` is required If we check the delivery address, we see that the house number is not taken into account when creating a new partner, and the address is incomplete. This commit adds the house number to the `street` field of t
Original PR description
Steps to reproduce: 1. Configure Sendcloud shipping with pick-up location 2. Go to website, use the shipping method and select a pick-up location 3. Go to the backend, confirm the sale order and validate the delivery 4. Get Error from Sendcloud that the `house_number` is required If we check the delivery address, we see that the house number is not taken into account when creating a new partner, and the address is incomplete. This commit adds the house number to the `street` field of the address to have a complete address. opw-3864382 Forward-Port-Of: odoo/enterprise#61290
There is an additional query in no-demo mode; let us avoid useless red runbots. Runbot-62073 Forward-Port-Of: odoo/enterprise#61434
Original PR description
There is an additional query in no-demo mode; let us avoid useless red runbots. Runbot-62073 Forward-Port-Of: odoo/enterprise#61434
Forward-Port-Of: odoo/enterprise#61153 Forward-Port-Of: odoo/enterprise#60776
Original PR description
Forward-Port-Of: odoo/enterprise#61153 Forward-Port-Of: odoo/enterprise#60776
# Issue: The query for constructing the aged_payable accounting report takes too long to load. # Analysis: When a database has lots of companies, it's likely to have a huge number of rows in the account_partial_reconcile table. Currently, the entire account_partial_reconcile table is being iterated in the report generation, only to be filtered out later on in the query. This superfluous computation is extremely inefficient and it could be easily avoided by correctly using LATERAL JOIN s
Original PR description
# Issue: The query for constructing the aged_payable accounting report takes too long to load. # Analysis: When a database has lots of companies, it's likely to have a huge number of rows in the…
# Issue: The query for constructing the aged_payable accounting report takes too long to load. # Analysis: When a database has lots of companies, it's likely to have a huge number of rows in the account_partial_reconcile table. Currently, the entire account_partial_reconcile table is being iterated in the report generation, only to be filtered out later on in the query. This superfluous computation is extremely inefficient and it could be easily avoided by correctly using LATERAL JOIN syntax to make use of the filters applied later on.  # Fix: Use the correct condition inside the lateral join to filter on account_move_lines that are already filtered later on. # Benchmark: ### Report loading time | # account partial reconcile lines | # account move lines | Company size | Before | After | | --- | ------ | ------ | ------| ----- | | 588503 | 2339215 | Large | 15m+ (timeout) | ~14.02s | | 5761 | 27635 | Medium | 15m+ (timeout) | ~3s | | 11 | 1513 | Small | 7.69 | ~1.6s | #### Total number of account partial reconcile: 3279438 #### Total number of account move lines: 10688953 # Related ticket: opw-3819017 Forward-Port-Of: odoo/enterprise#61036
Since the wrong module set on the maintenance worksheets, this would lead to issues when trying to uninstall the maintenance module, as it wouldn't find every models to uninstall. This ended up leaving some entries in the database after the module was removed. runbot-57422 Forward-Port-Of: odoo/enterprise#61355
Original PR description
Since the wrong module set on the maintenance worksheets, this would lead to issues when trying to uninstall the maintenance module, as it wouldn't find every models to uninstall. This ended up leaving some entries in the database after the module was removed. runbot-57422 Forward-Port-Of: odoo/enterprise#61355
Sources: https://www.socialsecurity.be/employer/instructions/dmfa/fr/latest/intermediates#bonus-a-l-emploi-plafonds-apres-l-augmentation-du-rmmmg-et-la-scission-du-calcul-29-03-2024 https://www.ucm.be/actualites/le-bonus-lemploi-renforce-au-1er-avril-2024#:~:text=Qu'est-ce%20que%20le,salaire%20net%20effectif%20est%20augment%C3%A9 Forward-Port-Of: odoo/enterprise#61358
Original PR description
Sources: https://www.socialsecurity.be/employer/instructions/dmfa/fr/latest/intermediates#bonus-a-l-emploi-plafonds-apres-l-augmentation-du-rmmmg-et-la-scission-du-calcul-29-03-2024 https://www.ucm.be/actualites/le-bonus-lemploi-renforce-au-1er-avril-2024#:~:text=Qu'est-ce%20que%20le,salaire%20net%20effectif%20est%20augment%C3%A9 Forward-Port-Of: odoo/enterprise#61358
When we desactivate the 'Rental Transfers' option, it should archive the Rental route. Forward-Port-Of: odoo/enterprise#60179
Original PR description
When we desactivate the 'Rental Transfers' option, it should archive the Rental route. Forward-Port-Of: odoo/enterprise#60179
https://www.socialsecurity.be/employer/instructions/dmfa/fr/latest/instructions/special_contributions/other_specialcontributions/asbestosfunds.html Forward-Port-Of: odoo/enterprise#61135
Original PR description
https://www.socialsecurity.be/employer/instructions/dmfa/fr/latest/instructions/special_contributions/other_specialcontributions/asbestosfunds.html Forward-Port-Of: odoo/enterprise#61135
Steps to reproduce: ------------------- - create an appraisal for an employee; - be the manager of the appraisal; Issue: ------ It is not possible to edit feedback before saving it. Cause: ------ The `accessible_employee_feedback` and `accessible_manager_feedback` fields are read only if `can_see_employee_publish` and `can_see_manager_publish` are equal to `False`. These two fields depend on the `_compute_buttons_display` method, which will test whether the employees linked to the
Original PR description
Steps to reproduce: ------------------- - create an appraisal for an employee; - be the manager of the appraisal; Issue: ------ It is not possible to edit feedback before saving it. Cause: ------ The `accessible_employee_feedback` and `accessible_manager_feedback` fields are read only if `can_see_employee_publish` and `can_see_manager_publish` are equal to `False`. These two fields depend on the `_compute_buttons_display` method, which will test whether the employees linked to the user are in the appraisal managers. The following condition will never be true if the appraisal has not yet been saved: ```py user_employees in appraisal.manager_ids ``` This is because manager_ids will be a `NewId` recordset. Solution: --------- It is necessary to compare ids and not records directly because Model does not support equality between existed records in database and virtual records. opw-3869446 Forward-Port-Of: odoo/enterprise#61221
Before this commit: When exporting a report to a pdf if we were not using tax units there was no VAT After this commit: When exporting a report as pdf company VAT is shown if no tax unit is used. If we are using tax units, then tax units VAT will be shown instead task: 3864218 see: #58361 Forward-Port-Of: odoo/enterprise#61146 Forward-Port-Of: odoo/enterprise#61011
Original PR description
Before this commit: When exporting a report to a pdf if we were not using tax units there was no VAT After this commit: When exporting a report as pdf company VAT is shown if no tax unit is used. If we are using tax units, then tax units VAT will be shown instead task: 3864218 see: #58361 Forward-Port-Of: odoo/enterprise#61146 Forward-Port-Of: odoo/enterprise#61011
This traceback occurs when the user tries to duplicate a follow-up level record. To reproduce this issue: 1) Install `Accounting` 2) Open `Accounting/configuration/follow-up levels` 3) Select any one record and try to `duplicate` it. Error:- ``` TypeError: argument of type 'NoneType' is not iterable ``` https://github.com/odoo/enterprise/blob/a1921fb9a27e5da3592dbc3d9c34e41776b6c8d4/account_followup/models/account_followup.py#L47-L51 When the user tries to duplicate any rec
Original PR description
This traceback occurs when the user tries to duplicate a follow-up level record. To reproduce this issue: 1) Install `Accounting` 2) Open `Accounting/configuration/follow-up levels` 3) Select any one…
This traceback occurs when the user tries to duplicate a follow-up level record. To reproduce this issue: 1) Install `Accounting` 2) Open `Accounting/configuration/follow-up levels` 3) Select any one record and try to `duplicate` it. Error:- ``` TypeError: argument of type 'NoneType' is not iterable ``` https://github.com/odoo/enterprise/blob/a1921fb9a27e5da3592dbc3d9c34e41776b6c8d4/account_followup/models/account_followup.py#L47-L51 When the user tries to duplicate any record, the default value is None, which leads to the above traceback as there is no fallback for default. Because of refactoring in [1] After applying this commit, the issue will be resolved by giving a fallback value. Additionally, an SQL unique name constraint was encountered when attempting to duplicate it because of [2], so this commit also fixed by adding 15 days to the `highest delay in that company + the record name`. Previously duplicating `several levels` at the same time leads to `days_uniq` constraint because of the same delay. This commit will allow duplication several levels at the same time by offsetting `highest existing delay + 15 arbitrary days`. [1] https://github.com/odoo/enterprise/commit/e27a20d2e9a909260f28b18b0643b8205470236b [2] https://github.com/odoo/enterprise/blob/278290dd220e7ca8d4b9909d1bc48a93ac14c0eb/account_followup/models/account_followup.py#L44 sentry-5134878308 Forward-Port-Of: odoo/enterprise#59961
Before this commit, the test was not correctly simulating a click on the link chart button. This was due to the fact that the only event that was triggered was the pointerdown event, which is not enough to trigger the click event. For an unknown reason, only triggering the pointerdown event has a side effect during the test to trigger an event handled in the Leatlef library, would lead to an error in the library, and thus in the test suite. This commit fixes the issue by using the click he
Original PR description
Before this commit, the test was not correctly simulating a click on the link chart button. This was due to the fact that the only event that was triggered was the pointerdown event, which is not enough to trigger the click event. For an unknown reason, only triggering the pointerdown event has a side effect during the test to trigger an event handled in the Leatlef library, would lead to an error in the library, and thus in the test suite. This commit fixes the issue by using the click helper function from the web client test helpers. Runbot: 59203 Forward-Port-Of: odoo/enterprise#61410