Thursday, July 25, 2024
26 changes · saas-17.2
Resolved issues and error corrections
This fixes a web testing helper so it more accurately detects whether an element is attached to a document. It helps prevent incorrect test behavior in edge cases, improving reliability for Odoo's web interface quality checks.
Original PR description
This commit ensures that the `isInDOM` helper function in Hoot actually checks that the given target is connected to a document. The previous implementation was naïve and only relied on the presence of a parent element. This was incomplete as there are some cases where a node is connected to a document element without having a `parentNode`. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
Community: https://github.com/odoo/odoo/pull/174567
Original PR description
Community: https://github.com/odoo/odoo/pull/174567
Problem --------- Currently, if you install l10n_xx and update some specific account codes (depending on the localization) and then try to install the corresponding l10n_xx_hr_payroll_account hr module, you are struck with an error that cancels the installation as some accounts are missing. 1. Install l10n_ae for example 2. Switch to AE company 3. Update the account with code 201002 to 701002 4. Install l10n_ae_hr_payroll_account -> Error occurs during the installation Objective ----
Original PR description
Problem --------- Currently, if you install l10n_xx and update some specific account codes (depending on the localization) and then try to install the corresponding l10n_xx_hr_payroll_account hr module, you are struck with an error that cancels the installation as some accounts are missing. 1. Install l10n_ae for example 2. Switch to AE company 3. Update the account with code 201002 to 701002 4. Install l10n_ae_hr_payroll_account -> Error occurs during the installation Objective --------- Be able to install the module even when the account is missing. Solution --------- Log a warning instead of raising an error. opw-3961798 Forward-Port-Of: odoo/enterprise#67241
Description of the issue this commit addresses: We do not want the user to be able to create fiscal years on child companies. --- Desired behavior after this commit is merged: A new check in fiscal years raises an error when the user tries to create a fiscal year from a child company. --- no task-feedback Forward-Port-Of: odoo/enterprise#67285 Forward-Port-Of: odoo/enterprise#67121
Original PR description
Description of the issue this commit addresses: We do not want the user to be able to create fiscal years on child companies. --- Desired behavior after this commit is merged: A new check in fiscal years raises an error when the user tries to create a fiscal year from a child company. --- no task-feedback Forward-Port-Of: odoo/enterprise#67285 Forward-Port-Of: odoo/enterprise#67121
Currently it is assumed that all assets we write on belong to the same company. (Any exceptions to this are probably rare in practice.) This commit ensures that writing on assets with different companies works correctly. (no task) Forward-Port-Of: odoo/enterprise#67262 Forward-Port-Of: odoo/enterprise#65795
Original PR description
Currently it is assumed that all assets we write on belong to the same company. (Any exceptions to this are probably rare in practice.) This commit ensures that writing on assets with different companies works correctly. (no task) Forward-Port-Of: odoo/enterprise#67262 Forward-Port-Of: odoo/enterprise#65795
Synchronization with Transifex does not work for some languages, I don't know why. I manually pulled the translatios and here's the commit with them. opw-4009074
Original PR description
Synchronization with Transifex does not work for some languages, I don't know why. I manually pulled the translatios and here's the commit with them. opw-4009074
Steps to reproduce - Display the intrastat report with at least one line - Create a european company - Install intrastat - Create and post an invoice to partner from another european country - Open the intrastat report - Deactivate the "Grouped" filter in the Options - Activate the Comparison filter (with any other date) => Traceback stating that the query has syntax error Cause of the issue: Missing parentheses between the different sections of the UNION ALL statement. task-40
Original PR description
Steps to reproduce - Display the intrastat report with at least one line - Create a european company - Install intrastat - Create and post an invoice to partner from another european country - Open the intrastat report - Deactivate the "Grouped" filter in the Options - Activate the Comparison filter (with any other date) => Traceback stating that the query has syntax error Cause of the issue: Missing parentheses between the different sections of the UNION ALL statement. task-4017165 Forward-Port-Of: odoo/enterprise#67148 Forward-Port-Of: odoo/enterprise#65720
Step to reproduce: - Activate analytic accounting in the Accounting settings - Create an analytic account - Create an invoice with this new analytic account - Create a horizontal group, for example on the product_id field. - Enable the Profit and Loss report on the horizontal group - Open the P&L report and activate both the analytical and the horizontal groupby filters. => no result is displayed in the column of the analytical filter. Cause of the issue: When activating the an
Original PR description
Step to reproduce: - Activate analytic accounting in the Accounting settings - Create an analytic account - Create an invoice with this new analytic account - Create a horizontal group, for example…
Step to reproduce: - Activate analytic accounting in the Accounting settings - Create an analytic account - Create an invoice with this new analytic account - Create a horizontal group, for example on the product_id field. - Enable the Profit and Loss report on the horizontal group - Open the P&L report and activate both the analytical and the horizontal groupby filters. => no result is displayed in the column of the analytical filter. Cause of the issue: When activating the analytic groupby, it creates a shadowing of the move lines based on the analytic lines. This shadowing loses most of the data of the move lines, which can therefore no longer be of use to create more advanced filters. Proposed solution: When doing the shadowing, if the account.analytic.line does not have the column present in the account.move.line, then takes the value of the related move line, instead of setting the value to NULL as it was done before. opw-4048157 Forward-Port-Of: odoo/enterprise#67250 Forward-Port-Of: odoo/enterprise#66980
Steps: Login as portal, and to to a task form, page sub-tasks. Make Customer column visible. Add a line and try to edit that field. Issue: You can't. But after saving, you can. Cause: The field is invisible if `allow_billable` and `is_fsm` are False. A child task inherits both from its parent, but this one hasn't been created yet. Solution: In this case, the condition is not needed. If we create the child and he has both fields to False, it means its parent too. Yet the `partner_
Original PR description
Steps: Login as portal, and to to a task form, page sub-tasks. Make Customer column visible. Add a line and try to edit that field. Issue: You can't. But after saving, you can. Cause: The field is invisible if `allow_billable` and `is_fsm` are False. A child task inherits both from its parent, but this one hasn't been created yet. Solution: In this case, the condition is not needed. If we create the child and he has both fields to False, it means its parent too. Yet the `partner_id` column is invisible if it is the case. So the solution is simple: remove the condition. related: https://github.com/odoo/odoo/pull/174323 task-3713729 Forward-Port-Of: odoo/enterprise#67252
When opening the shopfloor from a specific workcenter, workorder or production order, only the concerned workcenter should be shown. task-4060857 Forward-Port-Of: odoo/enterprise#66923
Original PR description
When opening the shopfloor from a specific workcenter, workorder or production order, only the concerned workcenter should be shown. task-4060857 Forward-Port-Of: odoo/enterprise#66923
Before this commit, some Markup were missing in some post message which resulted in some html to be displayed in the chatter. task: 4041892 Community: https://github.com/odoo/odoo/pull/173375 Forward-Port-Of: odoo/enterprise#67255 Forward-Port-Of: odoo/enterprise#66767
Original PR description
Before this commit, some Markup were missing in some post message which resulted in some html to be displayed in the chatter. task: 4041892 Community: https://github.com/odoo/odoo/pull/173375 Forward-Port-Of: odoo/enterprise#67255 Forward-Port-Of: odoo/enterprise#66767
Steps: - Install helpdesk_timesheet - In Kanban View > Start the timer of a ticket Issue: - If we have a kanban card with an older date and we start and stop the timer, a new kanban entry will be made with today's date. But for the tickets , if we start a timer, the ticket_id is not set in the timer header with in the new ticket. Cause: - Due to the condition given in the `action_start_new_timesheet_timer`, there is no helpdesk_ticket_id mentioned in that function. Fix: - B
Original PR description
Steps: - Install helpdesk_timesheet - In Kanban View > Start the timer of a ticket Issue: - If we have a kanban card with an older date and we start and stop the timer, a new kanban entry will be made with today's date. But for the tickets , if we start a timer, the ticket_id is not set in the timer header with in the new ticket. Cause: - Due to the condition given in the `action_start_new_timesheet_timer`, there is no helpdesk_ticket_id mentioned in that function. Fix: - By extending the `_get_new_timesheet_timer_vals` to the helpdesk_timesheet module to gave helpdesk_ticket_id the issue will be solved. task-3970176 Forward-Port-Of: odoo/enterprise#64359
### Steps to reproduce: - Install the 'l10n_sa' module and switch to a Saudi company - In the Settings of Accounting, tick the option "Default Terms & Conditions" and select "Add a Note" - Write something in for the Terms & Conditions - In the Accounting app create a new invoice, confirm and preview - At the bottom of the preview, the Terms & Conditions are duplicated ### Cause: The report is trying to print the Arabic and English translation of the Term & Conditions, but only one of th
Original PR description
### Steps to reproduce: - Install the 'l10n_sa' module and switch to a Saudi company - In the Settings of Accounting, tick the option "Default Terms & Conditions" and select "Add a Note" - Write…
### Steps to reproduce: - Install the 'l10n_sa' module and switch to a Saudi company - In the Settings of Accounting, tick the option "Default Terms & Conditions" and select "Add a Note" - Write something in for the Terms & Conditions - In the Accounting app create a new invoice, confirm and preview - At the bottom of the preview, the Terms & Conditions are duplicated ### Cause: The report is trying to print the Arabic and English translation of the Term & Conditions, but only one of the two exists, so they appear duplicated. ### Solution: There is already a way to translate manually the Terms & Conditions (Have the 2 languages installed, and a button appear near the text). So the fix is simply to display only the Arabic language when there is only one translation. A problem is that if the only translation is the English one, it will be printed as if it was written from right to left. But there is no way to know exactly the language of the text, and we can suppose the base language will be Arabic in most cases. opw-4043175 Forward-Port-Of: odoo/odoo#172781
Before this commit, if a settings app doesn't have settings (for instance if a setting header is not selected), the no content helper was always shown. The issue with this, is that the settings page is not a multi-record view, it's a customize form view, the content helper, it should only be shown if a search is performed and that no setting is found. This commit, fix this, and allow the no content helper to appear only if a search is performed and no setting is found. opw-4016050 Forward
Original PR description
Before this commit, if a settings app doesn't have settings (for instance if a setting header is not selected), the no content helper was always shown. The issue with this, is that the settings page is not a multi-record view, it's a customize form view, the content helper, it should only be shown if a search is performed and that no setting is found. This commit, fix this, and allow the no content helper to appear only if a search is performed and no setting is found. opw-4016050 Forward-Port-Of: odoo/odoo#174172 Forward-Port-Of: odoo/odoo#174059
To replicate the issue: - Go to the partner page of the current company (Invoicing > Customers > Customers > Look for the company) - Change type from Company to Individual - Create and post an invoice - Click on Send & Print. Download the Facturae - NAME should appear in line 30, before AddressInSpain, but it doesn't Cause of the issue: The template values do not include a value for self_party_name, only for other_party_name. In the template, when partner_name is set, no value is passed
Original PR description
To replicate the issue: - Go to the partner page of the current company (Invoicing > Customers > Customers > Look for the company) - Change type from Company to Individual - Create and post an invoice - Click on Send & Print. Download the Facturae - NAME should appear in line 30, before AddressInSpain, but it doesn't Cause of the issue: The template values do not include a value for self_party_name, only for other_party_name. In the template, when partner_name is set, no value is passed for self_party. Fix: Instead of only extracting the partner name for partner (other_party), the code is used in a new function, which can be called for both partner and company (self_party). Then, self_party_name can be used as a value in the template. opw-4053023 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#174266 Forward-Port-Of: odoo/odoo#173608
This commit fixes an issue where the property values were not reset after creating a property, setting its value, using the pager to access another record and changing the property's type. When going back to the initial record, the old value would still be there and it could trigger a traceback depending on the type change (e.g. from string to integer). The issue is fixed by using a record observer to trigger _saveInitialPropertiesValues on record id change in the properties field component.
Original PR description
This commit fixes an issue where the property values were not reset after creating a property, setting its value, using the pager to access another record and changing the property's type. When going back to the initial record, the old value would still be there and it could trigger a traceback depending on the type change (e.g. from string to integer). The issue is fixed by using a record observer to trigger _saveInitialPropertiesValues on record id change in the properties field component. This allows to keep coherent values inside the initialValues and to generate a new property name properly when the property's definition changes. In case of a change in the property's name, the value of the property for all other records using it will be properly reset to default. OPW-4015949 Forward-Port-Of: odoo/odoo#173505
Steps to reproduce: - Open Project - Go into any project in kanban view - Mark any task as done. - From the progress bar click on done section Issue: - You can see that the color is does not apply while grouping tasks using progress-bar. Cause: - Missing css-kanban-filter which supplies the color to be applied while grouping by progressbar. - Adding CSS-filter is not done because success-done i.e. color of done tasks is not from standard CSS library(I.e. Bootstrap). Solutio
Original PR description
Steps to reproduce: - Open Project - Go into any project in kanban view - Mark any task as done. - From the progress bar click on done section Issue: - You can see that the color is does not apply while grouping tasks using progress-bar. Cause: - Missing css-kanban-filter which supplies the color to be applied while grouping by progressbar. - Adding CSS-filter is not done because success-done i.e. color of done tasks is not from standard CSS library(I.e. Bootstrap). Solution: - Add the CSS filter for done stage name as success-done. task-3852596 Forward-Port-Of: odoo/odoo#163086
Current behavior before PR: I. Inserting text into an empty paragraph tag with a `br` does not remove the `br`. II. When pasting single or multiple block elements the start and end block would unwrap causing inconsistency while pasting. III. Unwrapping the firstChild and the lastChild when pasting empty blocks resulted in the addition of br's to the block. Desired behavior after PR is merged: I. Inserting text into an empty node with a `br` should result in the removal of that `br`
Original PR description
Current behavior before PR: I. Inserting text into an empty paragraph tag with a `br` does not remove the `br`. II. When pasting single or multiple block elements the start and end block would unwrap causing inconsistency while pasting. III. Unwrapping the firstChild and the lastChild when pasting empty blocks resulted in the addition of br's to the block. Desired behavior after PR is merged: I. Inserting text into an empty node with a `br` should result in the removal of that `br`. II. Make sure if the node to start or end with is the same node we want to paste into; unwrap it, otherwise split the node. III. Empty blocks are no longer unwrapped when pasting. IV. This PR also addresses issues with testcases that includes `p` tag without a `br`. task-3630662 Forward-Port-Of: odoo/odoo#173890 Forward-Port-Of: odoo/odoo#160345
Problem: Partner address is never display in the partner list and the search doesn't work with the address Steps to reproduce: - Install "point_of_sale" app - Start a shop session - Click on "Customer" - The address is not displayed for any partner Cause: The address field of a partner got lost during refactoring in v17.1 opw-4032931 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#172386
Original PR description
Problem: Partner address is never display in the partner list and the search doesn't work with the address Steps to reproduce: - Install "point_of_sale" app - Start a shop session - Click on "Customer" - The address is not displayed for any partner Cause: The address field of a partner got lost during refactoring in v17.1 opw-4032931 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#172386
### Issue: Generated invoices does not appear in the page 'Manage Attachments'. ### Steps to reproduce: - Activate the developer mode - In Accounting > Customers > Invoices create a new one - Confirm and click on Send & Print, an invoice is generated and can be seen in the attachment of the chatter - Click on the debug icon, then on 'Manage Attachments' - The attachment does not show up ### Cause: The domain used for the 'Manage Attachments' search does not contain restriction on re
Original PR description
### Issue:
Generated invoices does not appear in the page 'Manage Attachments'.
### Steps to reproduce:
- Activate the developer mode
- In Accounting > Customers > Invoices create a new one
- Confirm and click on Send & Print, an invoice is generated and can be seen in the attachment of the chatter
- Click on the debug icon, then on 'Manage Attachments'
- The attachment does not show up
### Cause:
The domain used for the 'Manage Attachments' search does not contain restriction on res_field and id. So a new condition is added: ('res_field', '=', False). The logic behind this functionality is explained in this commit: https://github.com/odoo/odoo/commit/1bb61c970ed63eabe3821d21f3ed6f99c4b16daa In the case of invoices res_field is equal to invoice_pdf_report_file, so the invoice does not appear.
### Solution:
Add a context to the search request to skip the res_field test. Thus showing all attachments.
opw-3997094
Forward-Port-Of: odoo/odoo#172722Steps: - Login as portal, and to to a task form, page sub-tasks. - Make Customer column visible. - Add a line and try to edit that field. Issue: You can't. But after saving, you can. Cause: The new record doesn't have a project (it will be given to it on save). Yet this PR odoo#111335 added the condition that it should be invisible if no project. The reason why it caused no issue in 16.3 (where it was merged) was that there was a default project in `child_ids`'s context. Solution
Original PR description
Steps: - Login as portal, and to to a task form, page sub-tasks. - Make Customer column visible. - Add a line and try to edit that field. Issue: You can't. But after saving, you can. Cause: The new record doesn't have a project (it will be given to it on save). Yet this PR odoo#111335 added the condition that it should be invisible if no project. The reason why it caused no issue in 16.3 (where it was merged) was that there was a default project in `child_ids`'s context. Solution: In this case, the condition is not needed. Subtasks always have a project : private tasks can't have subtasks and deleting project field on a non-private task's subtask will actually give it its parent project. So the solution is simple: remove the condition. task-3713729 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#174323
Backport of commit 2b27e1bd8015a26694ba66e95f5d62f19508b6ed Forward-Port-Of: odoo/odoo#174367
Original PR description
Backport of commit 2b27e1bd8015a26694ba66e95f5d62f19508b6ed Forward-Port-Of: odoo/odoo#174367
Fixed printer and serial devices detection: both listing more devices than expected. Task: 3947355 Forward-Port-Of: odoo/odoo#174164
Original PR description
Fixed printer and serial devices detection: both listing more devices than expected. Task: 3947355 Forward-Port-Of: odoo/odoo#174164
Some aliases to save a lot of time to IoT Team: - odoo, - odoo_help, - odoo_logs, - write_mode, - read_mode, - install, - blackbox. Use `odoo_help` to have more information. Task: 3947538 Forward-Port-Of: odoo/odoo#174085
Original PR description
Some aliases to save a lot of time to IoT Team: - odoo, - odoo_help, - odoo_logs, - write_mode, - read_mode, - install, - blackbox. Use `odoo_help` to have more information. Task: 3947538 Forward-Port-Of: odoo/odoo#174085
Enterprise: https://github.com/odoo/enterprise/pull/67366
Original PR description
Enterprise: https://github.com/odoo/enterprise/pull/67366
Current Behavior: Computation of the field `pos_order_count` on model `loyalty.program` is slow when there is a large number of `pos.order.line` records with `reward_id` set on them. Cause of the issue: The list comprehension done here --> https://github.com/odoo/odoo/blob/27ff3e0f64f53caa62c3022bd3b7c41e29a8e721/addons/pos_loyalty/models/loyalty_program.py#L59 The complexity is `O(len(self) * ((len(read_group_res) * len(program_reward_ids)) + len(read_group_res<sum method>)))` which pe
Original PR description
Current Behavior: Computation of the field `pos_order_count` on model `loyalty.program` is slow when there is a large number of `pos.order.line` records with `reward_id` set on them. Cause of the…
Current Behavior: Computation of the field `pos_order_count` on model `loyalty.program` is slow when there is a large number of `pos.order.line` records with `reward_id` set on them. Cause of the issue: The list comprehension done here --> https://github.com/odoo/odoo/blob/27ff3e0f64f53caa62c3022bd3b7c41e29a8e721/addons/pos_loyalty/models/loyalty_program.py#L59 The complexity is `O(len(self) * ((len(read_group_res) * len(program_reward_ids)) + len(read_group_res<sum method>)))` which performs slowly if the `self` and `read_group_res` are large. Improvement: Delegate the computation to Postgres and assign the values obtained from the result. Benchmark: In method `_compute_pos_order_count` Number of `pos.order.line` records eligible in computation --> 17803 Where `self` is a a `loyalty.program` recordset len(self)| Before (in seconds) | After PR (in seconds) | |---------|--------|--------| |1000| 177.28 s | 6.43 s | |212| 29.73 s| 0.5 s | Improvement by about 98% on average opw-3903159 Forward-Port-Of: odoo/odoo#172394 Forward-Port-Of: odoo/odoo#167386