Monday, October 17, 2022
29 changes · master
Enhancements to existing features
Grouped data queries were simplified to avoid unnecessary database work when calculating and counting records. This should improve performance for reports and list views that group records, with only a small compatibility note for ordering by record ID in advanced uses.
Original PR description
[IMP] core: simplify SQL query generated from read_group - The query aggreagate the `min(<table>.id)` but the result of it is removed later in `_read_group_format_result`. Then it generates a waste of CPU/IO for PostgreSQL. It was usefull only to able to sort only by `id`, but it always better to sort on the groupby key, because PostgreSQL need to already do to create groups. - Also `<table>.id` inside the `count` generate extra work from PostgreSQL because it needs to check if each `id` is NOT NULL (always) and fetch `id` from disk for nothing. task-2994273
The company form no longer shows an option to duplicate a company, because duplicating companies is not supported. This prevents users from trying an action that would fail and reduces confusion in company administration.
Original PR description
Ducplicating a company is not allowed (see copy override in base/res_company.py), therefore removing the button from the view altogether can avoid user confusion. Task-3000228
The Discuss sidebar code was reorganized so more of its behavior is managed in shared data models rather than screen components. This makes the mail and live chat areas easier to maintain and should reduce future development risk without changing the user experience.
Original PR description
\* = im_livechat + Create DiscussSidebarView + Replace the use of useUpdate with useUpdateToModel Task-3004215.
The messaging and live chat typing indicators were reorganized so their behavior is handled more consistently behind the scenes. This helps keep the user experience reliable while making future maintenance easier, with no major visible workflow changes expected.
Original PR description
*: im_livechat Task-3004018.
The mail app’s messaging menu code was reorganized to make it easier to maintain and evolve. This internal cleanup helps reduce future development risk without changing the user experience.
Original PR description
Task-3004195.
The mail app's typing status logic was reorganized so it is handled in shared data models rather than screen components. This is an internal improvement that should make the feature easier to maintain without changing how users experience typing indicators.
Original PR description
Task-3002619.
The Discuss mobile mailbox selection code was reorganized so its behavior is handled in the underlying app model rather than directly in the screen component. This makes the mail interface easier to maintain and evolve, with minimal direct impact on daily users.
Original PR description
+ Create DiscussMobileMailboxSelectionView model + Pass DiscussMobileMailboxSelectionView record as props Task-3014747.
Resolved issues and error corrections
The contribution guidelines now point contributors to the correct version 16 template. This helps people submit changes using the right format, reducing confusion and review friction.
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#103207
Code cleanup and technical improvements
This update reorganizes how several mail and live chat interface elements are powered behind the scenes. It should make future maintenance and improvements easier without introducing major visible changes for users.
Original PR description
[[IMP] mail, *: move code from components to models (DiscussSidebar)](https://github.com/odoo/odoo/commit/2a4986d954801500560212208b52166b8cacfea6) Task-3004215 [[IMP] mail: move code from components to models (MessagingMenuTab)](https://github.com/odoo/odoo/commit/27c3879955a8e4c0780266a3d7c39891e334c125) Task-3004195 [[IMP] mail: move code from components to models (ThreadTextualTypingStatus)](https://github.com/odoo/odoo/commit/94b5c8e3c9b0cf3fbaf39e180580dca7f895f32f) Task-3002619 [[IMP] mail, *: move code from components to models (ThreadTypingIcon)](https://github.com/odoo/odoo/commit/072a9d2b7d24ad022727690b1942742b853b128e) Task-3004018 [[IMP] mail: move code from components to models (DiscussMobileMailboxSelection)](https://github.com/odoo/odoo/commit/7381c03139742fdd118ef47c4d21e6a2598c018d) Task-3014747
Miscellaneous changes
On a receipt from a subcontractor, if the user prints the labels, it will also print the labels of the components. To reproduce the issue: 1. Create two storable products P_finished, P_compo 2. Create a BoM: - Product: P_finished - Type: Subcontracting - Subcontractors: a new subcontractor SC - Components: 1 x P_compo 3. Create and confirm a purchase order: - Vendor: SC - Products: 1 x P_finished 4. Open the receipt 5. Open the detailed operations of P_fini
Original PR description
On a receipt from a subcontractor, if the user prints the labels, it will also print the labels of the components. To reproduce the issue: 1. Create two storable products P_finished, P_compo 2.…
On a receipt from a subcontractor, if the user prints the labels, it
will also print the labels of the components.
To reproduce the issue:
1. Create two storable products P_finished, P_compo
2. Create a BoM:
- Product: P_finished
- Type: Subcontracting
- Subcontractors: a new subcontractor SC
- Components: 1 x P_compo
3. Create and confirm a purchase order:
- Vendor: SC
- Products: 1 x P_finished
4. Open the receipt
5. Open the detailed operations of P_finished
6. Set the producing quantity to 1 and record the production
7. Print the labels
Error: P_compo is in the labels, it should not
When opening the receipt (step 4), the tree view of all operations has a
context with a lot of default values:
https://github.com/odoo/odoo/blob/4248aac2d224363a6ac4a59881bdb7c321623e4b/addons/stock/views/stock_picking_views.xml#L355-L358
Among them, a default value for `picking_id`.
Step 5-6, the user opens the detailed operations and completes the
produced/consumed quantities. Here is the issue: when saving the
quantities, a SML is created for the consumption of P_compo and because
of the context, its `picking_id` field is defined with the receipt
(which is incorrect).
Finally, when opening the wizard to print the labels, we use the SML of
the picking to get the products that need to be printed:
https://github.com/odoo/odoo/blob/d6304b28b8de027ba6eaa44ebc9b4b28d2c166c0/addons/stock/models/stock_picking.py#L1505-L1507
So, we will print P_compo on the labels PDF.
OPW-2991592
Forward-Port-Of: odoo/odoo#103027
Forward-Port-Of: odoo/odoo#102189The `analytic_distribution` field is a Json. It was stored temporarily as a char. Search is not available yet, so we do queries by hand when we need to search on keys. Also added a constraint on account_analytic_distribution_model, so we don't have models with accounts specific to a company when the model has no company or another company. It would cause an issue when looking at the models from another company. Description of the issue/feature this PR addresses: Current behavior b
Original PR description
The `analytic_distribution` field is a Json. It was stored temporarily as a char. Search is not available yet, so we do queries by hand when we need to search on keys. Also added a constraint on account_analytic_distribution_model, so we don't have models with accounts specific to a company when the model has no company or another company. It would cause an issue when looking at the models from another company. Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#101701
classic layout issue due to the group that caused a wrong alignment Forward-Port-Of: odoo/odoo#103092
Original PR description
classic layout issue due to the group that caused a wrong alignment Forward-Port-Of: odoo/odoo#103092
Purpose: * To ensure consistency with rules configuration, some records should not be opened from there. * In sales team, the gauge showing the count of assigned leads in the members kanban cards was not shown anymore. In this commit, the style of previous version is restored. We also fix the unnecessarily large height of the embedded kanban view. * On teams kanban view, action field values were joined with their label. Task-3004227 Forward-Port-Of: odoo/odoo#101897
Original PR description
Purpose: * To ensure consistency with rules configuration, some records should not be opened from there. * In sales team, the gauge showing the count of assigned leads in the members kanban cards was not shown anymore. In this commit, the style of previous version is restored. We also fix the unnecessarily large height of the embedded kanban view. * On teams kanban view, action field values were joined with their label. Task-3004227 Forward-Port-Of: odoo/odoo#101897
**Description of the issue/feature this PR addresses:** Attachment count is always Zero on Job Positions **Impacted versions**: 14.0 15.0 16.0 **Current behaviour before PR:** Before this PR, the attachment is not shown and attachment count is always zero in the Job Positions. **Desired behaviour after PR is merged:** After this PR merge, the attachment will shown and attachment count will counted in the Job Positions. **Fix the issue** [#62643](https://github.com/odoo/odoo
Original PR description
**Description of the issue/feature this PR addresses:** Attachment count is always Zero on Job Positions **Impacted versions**: 14.0 15.0 16.0 **Current behaviour before PR:** Before this PR, the attachment is not shown and attachment count is always zero in the Job Positions. **Desired behaviour after PR is merged:** After this PR merge, the attachment will shown and attachment count will counted in the Job Positions. **Fix the issue** [#62643](https://github.com/odoo/odoo/issues/62643) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#101353
Forward-Port-Of: odoo/odoo#102925
Original PR description
Forward-Port-Of: odoo/odoo#102925
Steps to reproduce: - Go to reward and loyalty add a reward to a program - Select the free product reward in type - Select a product Current behavior: There is a JS traceback Explanation: The reward_product_uom_id was missing from the form Forward-Port-Of: odoo/odoo#103189
Original PR description
Steps to reproduce: - Go to reward and loyalty add a reward to a program - Select the free product reward in type - Select a product Current behavior: There is a JS traceback Explanation: The reward_product_uom_id was missing from the form Forward-Port-Of: odoo/odoo#103189
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#103206
Original PR description
Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#103206
The analytic distribution widget in the Analytic Distribution Model form displayed its selection field on a new line, making it too large and odd. This PR fixes the styling to resemble the `many2many_tags` widget. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#102395
Original PR description
The analytic distribution widget in the Analytic Distribution Model form displayed its selection field on a new line, making it too large and odd. This PR fixes the styling to resemble the `many2many_tags` widget. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#102395
For the date filters with a default value set to "Automatically fitler on the current period", the clear button don't work. It does not clear the filter but revert it back to the default value. The bug happens in the global filters side panel as well as in the dashboards. Odoo task [2989909](https://www.odoo.com/web#id=2989909&cids=1&menu_id=4720&action=333&active_id=2328&model=project.task&view_type=form) Description of the issue/feature this PR addresses: Current behavior before PR
Original PR description
For the date filters with a default value set to "Automatically fitler on the current period", the clear button don't work. It does not clear the filter but revert it back to the default value. The bug happens in the global filters side panel as well as in the dashboards. Odoo task [2989909](https://www.odoo.com/web#id=2989909&cids=1&menu_id=4720&action=333&active_id=2328&model=project.task&view_type=form) Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#100579
Before this PR, the last notification id known by the client was not reset after restoring the database. This was an issue since there can be a gap between the last notification and the one that has been restored with the database. In this scenario, messages are not received after restoring the database since the client subscribes to higher notification ids that the ones that are created. This PR fixes this issue by defaulting to the highest notification id known by the server if the
Original PR description
Before this PR, the last notification id known by the client was not reset after restoring the database. This was an issue since there can be a gap between the last notification and the one that has been restored with the database. In this scenario, messages are not received after restoring the database since the client subscribes to higher notification ids that the ones that are created. This PR fixes this issue by defaulting to the highest notification id known by the server if the one the client passed is higher. Forward-Port-Of: odoo/odoo#103025
With a configured MX company create an invoice register a payment send cfdi of the payment The cfdi will be rejected by the EDI system because a sign is not consistent Task: 2979040 Forward-Port-Of: odoo/enterprise#31250
Original PR description
With a configured MX company create an invoice register a payment send cfdi of the payment The cfdi will be rejected by the EDI system because a sign is not consistent Task: 2979040 Forward-Port-Of: odoo/enterprise#31250
Before this commit, the knowledge actions were editable with studio. In the worst case scenario, it lead to crashes, in the best, it lead to editing a view which made little sense. After this commit, for simplicity's sake, we forbid that any action that presents the knowledge.article model be editable in studio. Forward-Port-Of: odoo/enterprise#32817
Original PR description
Before this commit, the knowledge actions were editable with studio. In the worst case scenario, it lead to crashes, in the best, it lead to editing a view which made little sense. After this commit, for simplicity's sake, we forbid that any action that presents the knowledge.article model be editable in studio. Forward-Port-Of: odoo/enterprise#32817
With the new reporting engine, the report lines, when clicked on, would redirect to its basic form. As we already have a method to display specific views for specific types of account moves and account move lines, we now use them to get to the correct view. This is done for the report lines in: - The journal report: now links to the correct form or widget for payments, bank statements, journal entries - All other reports: now links to the bank reconciliation widget when
Original PR description
With the new reporting engine, the report lines, when clicked on,
would redirect to its basic form. As we already have a method to display
specific views for specific types of account moves and account move
lines, we now use them to get to the correct view.
This is done for the report lines in:
- The journal report: now links to the correct form or widget for
payments, bank statements, journal entries
- All other reports: now links to the bank reconciliation widget
when choosing the "View bank statement" caret option.
Forward-Port-Of: odoo/enterprise#32588Task : 2985735 When a Quality Control Point isn't only for a manufacturing picking type, the work order operation field isn't necessary and is hidden. Forward-Port-Of: odoo/enterprise#32534
Original PR description
Task : 2985735 When a Quality Control Point isn't only for a manufacturing picking type, the work order operation field isn't necessary and is hidden. Forward-Port-Of: odoo/enterprise#32534
Before this commit: if you install "pos_hr_mobile" and try to open a PoS session without the "barcodes_mobile" module, you will get a server error. The solution is adding "barcodes_mobile" to the manifest's depend. opw-3008817 Forward-Port-Of: odoo/enterprise#32411
Original PR description
Before this commit: if you install "pos_hr_mobile" and try to open a PoS session without the "barcodes_mobile" module, you will get a server error. The solution is adding "barcodes_mobile" to the manifest's depend. opw-3008817 Forward-Port-Of: odoo/enterprise#32411
Steps to reproduce: - Install data_merge & contacts modules - Go to Data Cleaning -> Deduplication - Add filter for field `Company` with operator `is set` Issue: Traceback raised. Cause: Search on company_id does not handle operator 'is set' (wich the related operator received by function will be `!=` with value `False`). Solution: This commit add the handling of operator "!=" and change the way the value is evaluated (to handle the case where the value i
Original PR description
Steps to reproduce: - Install data_merge & contacts modules - Go to Data Cleaning -> Deduplication - Add filter for field `Company` with operator `is set` Issue: Traceback raised. Cause: Search on company_id does not handle operator 'is set' (wich the related operator received by function will be `!=` with value `False`). Solution: This commit add the handling of operator "!=" and change the way the value is evaluated (to handle the case where the value is a boolean and searching on a `ir.model` type field). opw-3002090 Forward-Port-Of: odoo/enterprise#32734
*: quality_control_iot, quality_mrp_workorder_iot The iot extensions of the quality module and its dependents currently do not include the iot counterparts of the dependencies of their parent modules. For example: the `mrp_workorder_iot` module only includes the `quality` and `iot` modules as its dependencies. Functionally though, it also depends on the iot extension of the `quality` module (`quality_iot`). When these missing dependencies are not installed, this can result in missing model
Original PR description
*: quality_control_iot, quality_mrp_workorder_iot The iot extensions of the quality module and its dependents currently do not include the iot counterparts of the dependencies of their parent modules. For example: the `mrp_workorder_iot` module only includes the `quality` and `iot` modules as its dependencies. Functionally though, it also depends on the iot extension of the `quality` module (`quality_iot`). When these missing dependencies are not installed, this can result in missing models or fields, causing a failure to load the registry. Note: because these modules are generally automatically installed the bug does not often manifest itself, however it can be triggered by manual install or uninstall operations. Forward-Port-Of: odoo/enterprise#32787 Forward-Port-Of: odoo/enterprise#30632
The `analytic_distribution` field is a Json. It was stored as char which was poor. It has been decided that the Json field won't be made in core, as we need more time to have a solid implementation. So a simple implementation of the Json field has been made in the analytic module. Forward-Port-Of: odoo/enterprise#32089
Original PR description
The `analytic_distribution` field is a Json. It was stored as char which was poor. It has been decided that the Json field won't be made in core, as we need more time to have a solid implementation. So a simple implementation of the Json field has been made in the analytic module. Forward-Port-Of: odoo/enterprise#32089
Currently, all the taxes included in the invoices are being sent in the XML for the electronic invoices. There are a couple of common processes in Colombia that require the user to include taxes in the invoices only for accounting purposes but do not need to be reported in the XML. Like, Self-Withholding and StateWitholdings (Rete ICA). So in this commit, In the Taxes value of the `Tipo de Valor` code has 'ZZ' skip them on the XML creation for EDI. TaskID - 2976963 Forward-Port-Of: odo
Original PR description
Currently, all the taxes included in the invoices are being sent in the XML for the electronic invoices. There are a couple of common processes in Colombia that require the user to include taxes in the invoices only for accounting purposes but do not need to be reported in the XML. Like, Self-Withholding and StateWitholdings (Rete ICA). So in this commit, In the Taxes value of the `Tipo de Valor` code has 'ZZ' skip them on the XML creation for EDI. TaskID - 2976963 Forward-Port-Of: odoo/enterprise#32760 Forward-Port-Of: odoo/enterprise#31541