Thursday, November 17, 2022
27 changes · master
Enhancements to existing features
The mail app now centralizes how messages are prepared and sent, reducing duplicated logic across the message composer. This should make message sending more consistent and easier to maintain without changing the user workflow.
Original PR description
The code that is used to sent message is splitted between composer and composer_view model. This PR centralize the sending process inside a message_composition model. The body of a message is voluntarily NOT a compute to avoid possible performances issues. Part of task-2390637
This update improves how Odoo records chat channel membership and message-seen information. It should make mail and messaging activity more efficient and reliable without changing the day-to-day user experience.
Updates how message read and fetched status changes are handled in the Mail app. This makes notification processing more consistent and helps keep conversation status information reliable for users.
Mail message status indicators such as history, required action, and starred are now calculated automatically instead of being stored separately. This improves consistency in conversations and notifications, reducing the chance of outdated message states appearing to users.
The web interface documentation now clearly states the four supported placement choices for popovers. This helps teams configure interface elements more consistently and reduces confusion during development or customization.
Original PR description
Position option has only 4 possibles values.
The accounting module no longer stores a separate off-balance marker on accounts because the same information is already available through the account type. This reduces duplication and helps keep accounting configuration and related processes more consistent without changing core business workflows.
Original PR description
We don't need the `is_off_balance` field on `account.account` as the same thing can be checked with `account_type`. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update improves the JavaScript development tools used by Odoo teams and prepares them for automated lint checks in runbot. It should make code quality checks easier to run consistently while improving developer productivity and editor support.
Original PR description
## Summary - Use of jsconfig instead of tsconfig - jsconfig deployed with tooling, no need for CLI - ecmascript bumped to version es2022 (static properties) - prettierrc merged inside the eslintrc -…
## Summary
- Use of jsconfig instead of tsconfig
- jsconfig deployed with tooling, no need for CLI
- ecmascript bumped to version es2022 (static properties)
- prettierrc merged inside the eslintrc
- add a few globals
- cleanup package.json scripts
- add script to lint/format only the diff (opposed to staged files)
- bump up node packages versions
- use eslint as cli instead of prettier-eslint, as eslint does provide
parsable output for runbot.
- add the typescrit types of libs as dependencies + main.d.ts to
improve autompletion.
This upgrade makes it easier to deploy and use the js tooling, as it is
expected more and more people will use it if a lint check is added to
the runbot.
## About the runbot:
The commit gets the code ready to enable the lint on the runbot.
It will lint the code with the same rules and same ignore file.
The only difference is the runbot will check only the diff and not the
entire commited file.
The goal will be to progressively (and aggressively) whitelist modules
to converge to a nice formatted codebase.
The runbot could run a command such as
`echo '{\"extends\": [\"plugin:diff/diff\"]}' | eslint --resolve-plugins-relative-to . -c /dev/stdin '**/*.js'`
assuming it is run inside /community and /enterprise.This update improves internal code annotations so developers get more accurate suggestions while working on Odoo's web interface. It helps speed up development and reduce mistakes, with no direct change to end-user features.
Original PR description
This commit adds and fixes type annotations to give more accurate autocompletion for javascript.
This update refines internal JavaScript configuration so developer tools can catch issues more clearly while working. It helps maintain code quality and productivity without changing how business users interact with Odoo.
This update simplifies and modernizes the JavaScript development tools used by Odoo Enterprise. It prepares automated quality checks to run more easily on changed code, helping teams improve code consistency over time without affecting end users directly.
Original PR description
- Use of jsconfig instead of tsconfig - jsconfig deployed with tooling, no need for CLI - ecmascript bumped to version es2022 (static properties) - prettierrc merged inside the eslintrc - add a few…
- Use of jsconfig instead of tsconfig - jsconfig deployed with tooling, no need for CLI - ecmascript bumped to version es2022 (static properties) - prettierrc merged inside the eslintrc - add a few globals - cleanup package.json scripts - add script to lint/format only the diff (opposed to staged files) - bump up node packages versions - use eslint as cli instead of prettier-eslint, as eslint does provide parsable output for runbot. - add the typescrit types of libs as dependencies + main.d.ts to improve autompletion. This upgrade makes it easier to deploy and use the js tooling, as it is expected more and more people will use it if a lint check is added to the runbot. About the runbot: The commit gets the code ready to enable the lint on the runbot. It will lint the code with the same rules and same ignore file. The only difference is the runbot will check only the diff and not the entire commited file. The goal will be to progressively (and aggressively) whitelist modules to converge to a nice formatted codebase.
This change updates accounting-related filters to work after an underlying account field is removed. It helps keep asset and automatic transfer workflows functioning correctly without changing how business users operate them.
Original PR description
Since `is_off_balance` field is being removed from `account.account`, the domains have to be updated accordingly.
Spreadsheet-related apps were adjusted to work with the latest spreadsheet library update. This helps keep document spreadsheets and spreadsheet editing reliable after the underlying component change, with no major workflow changes expected for users.
Resolved issues and error corrections
This update fixes small wording and typo issues in the profiler's speed visualization support. It improves clarity for people reading or using profiler output without changing business workflows or functionality.
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
Features or functions removed from Odoo
Outdated dynamic placeholder code was removed from legacy editor and messaging fields because newer compatible functionality already exists. This cleanup reduces maintenance effort and lowers the risk of conflicts with modern Odoo interfaces.
Original PR description
Remove the Dynamic Placeholder from the legacy Odoo field. Introduce in 308f639e295fce07e4f34d6c76b35aab259e21ad And migrate to be OWL compatible in #101768 Therefore the old code targeting legacy odoo field is unnecessary and need to be cleaned. task-3071417 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Miscellaneous changes
**Steps to reproduce:** - Switch to `?debug=assets` - Change the user language to Arabic and back to English → The page is still displayed in rtl mode **Cause of the issue:** The css is retrieved like this ```py >>> self.env['ir.attachment'].sudo().search([('url', '=like', '/web/assets/%/web.assets_common.css')]) ir.attachment(212, 189) >>> self.env['ir.attachment'].sudo().search([('url', '=like', '/web/assets/%/web.assets_common.css')]).mapped('url') ['/web/as
Original PR description
**Steps to reproduce:**
- Switch to `?debug=assets`
- Change the user language to Arabic and back to English → The page is still displayed in rtl mode
**Cause of the issue:**
The css is retrieved like this
```py
>>> self.env['ir.attachment'].sudo().search([('url', '=like', '/web/assets/%/web.assets_common.css')])
ir.attachment(212, 189)
>>> self.env['ir.attachment'].sudo().search([('url', '=like', '/web/assets/%/web.assets_common.css')]).mapped('url')
['/web/assets/212-5d47380/rtl/web.assets_common.css', '/web/assets/189-5d47380/web.assets_common.css']
```
Only the second one should be matched.
**Solution:**
Check for the absence of an extra parameter in the url
opw-2892012
Forward-Port-Of: odoo/odoo#104616
Forward-Port-Of: odoo/odoo#100882This update fixes missing dependency issues that could prevent certain Odoo app asset bundles from loading correctly. It adjusts manufacturing subcontracting with Studio, website helpdesk form editing, and payroll dashboard imports to keep related screens working after stricter dependency checks.
Original PR description
*: hr_payroll Since odoo modules having missing dependencies in now an error, this commit fixes some missing dependencies issues in mrp_subcontracting and in website_helpdesk. In mrp_subcontracting,…
*: hr_payroll Since odoo modules having missing dependencies in now an error, this commit fixes some missing dependencies issues in mrp_subcontracting and in website_helpdesk. In mrp_subcontracting, the mrp_subcontracting module defines a bundle that includes the assets_backend bundle but removes the files related to menu loading. These files are required by some other files added to assets_backend by web_studio. Because there already exists a bridge module, this commit removes the offending studio files from the bundle in that bridge module. In website_helpdesk, the form-editor fields are in the assets_frontend even though they depend on files defined in assets editor. While this works in practice because the form editor is only ever loaded in the frontend, and the module will be loaded when the assets_editor are loaded, there is no reason for it to not be in the assets_editor directly. The change in hr_payroll just updates an import because a file was moved in web in the community PR community: https://github.com/odoo/odoo/pull/104794
Previous commit https://github.com/odoo/odoo/commit/0501bbd62e517f6c215d9e7e36d61747c7f5816b missed ensuring a few models have required uom assigned even when the corresponding view has the field not there due to the setting not being active. This PR adds in guarantees that the field is set. This PR also fixes a couple small related bugs: - allow editing of the scrap_qty - ensure the uom is not visible when uoms are not active --- I confirm I have signed the CLA and read the PR guid
Original PR description
Previous commit https://github.com/odoo/odoo/commit/0501bbd62e517f6c215d9e7e36d61747c7f5816b missed ensuring a few models have required uom assigned even when the corresponding view has the field not there due to the setting not being active. This PR adds in guarantees that the field is set. This PR also fixes a couple small related bugs: - allow editing of the scrap_qty - ensure the uom is not visible when uoms are not active --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#104806
Opening the forecasted report of a product with variants throws an error Steps to reproduce: 1. Install Inventory 2. Enable debug mode 3. Go to Inventory > Products > Products 4. Open any product with more than 2 variants 5. Open the forecasted report of the product with the smart button 6. An error is thrown Solution: Change the `t-key` of the foreach to use the id of the product_variant Problem: The `t-key` of product_variants had duplicates opw-3057061 Forward-Port-Of: od
Original PR description
Opening the forecasted report of a product with variants throws an error Steps to reproduce: 1. Install Inventory 2. Enable debug mode 3. Go to Inventory > Products > Products 4. Open any product with more than 2 variants 5. Open the forecasted report of the product with the smart button 6. An error is thrown Solution: Change the `t-key` of the foreach to use the id of the product_variant Problem: The `t-key` of product_variants had duplicates opw-3057061 Forward-Port-Of: odoo/odoo#105742
**Steps to reproduce the bug:** - Create a storable product “Kit 1” with BOM: - Type: kit - Component: C1 - Make sure “C1” is out of stock - Create a Sale order: - Add “Kit 1” - Confirm the SO - Go to inventory > operations > replenishment **Problem:** A user error is displayed: “A product with a kit-type bill of materials can not have a reordering rule.” Because in the `_get_orderpoint_action`, an orderpoint is created for all missing products in each warehouse, b
Original PR description
**Steps to reproduce the bug:**
- Create a storable product “Kit 1” with BOM:
- Type: kit
- Component: C1
- Make sure “C1” is out of stock
- Create a Sale order:
- Add “Kit 1”
- Confirm the SO
- Go to inventory > operations > replenishment
**Problem:**
A user error is displayed: “A product with a kit-type bill of materials can not have a reordering rule.”
Because in the `_get_orderpoint_action`, an orderpoint is created for all missing products in each warehouse, but products that are kits are not filtered, so the constraints check is triggered:
https://github.com/odoo-dev/odoo/blob/32ea90106d1167374f5e9bb8683f2aaec6092720/addons/stock/models/stock_orderpoint.py#L338
https://github.com/odoo-dev/odoo/blob/32ea90106d1167374f5e9bb8683f2aaec6092720/addons/stock/models/stock_orderpoint.py#L419
opw-3039546
Forward-Port-Of: odoo/odoo#104366Before this commit, once a user was disconnected from internet (eg. network failure, laptop screen closed), the code disconnected the user from the peer to peer network and upon reconnection to the internet network, the code did not try to reconnect to the peer to peer network. This created a network partition in the peer to peer network each time a user disconnected and reconnected to the internet network. When there is a partition in the peer to peer network, the last subnet to write to
Original PR description
Before this commit, once a user was disconnected from internet (eg. network failure, laptop screen closed), the code disconnected the user from the peer to peer network and upon reconnection to the internet network, the code did not try to reconnect to the peer to peer network. This created a network partition in the peer to peer network each time a user disconnected and reconnected to the internet network. When there is a partition in the peer to peer network, the last subnet to write to the record erased the changes of another subnet without notification. This commit prevent the code to disconnect from the peer to peer network when there is any disconnection signal triggered. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#105857
It is not possible to consume a component tracked by serial that comes back from a scrap location To reproduce the issue: 1. In Settings, enable "Multi Routes" 2. Create two storable products P_compo, P_finished - P_compo is tracked by serial number 3. Update the on-hand qty of P_compo: - 1 x P_compo with serial SN 4. Process a manufacturing order MO: - Product: P_finished - Compo: 1 x P_compo with SN 5. Unbuild P_finished - It brings SN back to stock 5. Scrap
Original PR description
It is not possible to consume a component tracked by serial that comes
back from a scrap location
To reproduce the issue:
1. In Settings, enable "Multi Routes"
2. Create two storable products P_compo, P_finished
- P_compo is tracked by serial number
3. Update the on-hand qty of P_compo:
- 1 x P_compo with serial SN
4. Process a manufacturing order MO:
- Product: P_finished
- Compo: 1 x P_compo with SN
5. Unbuild P_finished
- It brings SN back to stock
5. Scrap one P_compo with SN
6. Unscrap it (thanks to an internal transfer)
7. Repeat step 4
Error: a user error is raised: "The serial number SN used for component
P_compo has already been consumed"
When checking the SN uniqueness of a component, we don't consider the
case where a product came back from a srap location
OPW-3055252
Forward-Port-Of: odoo/odoo#105895
Forward-Port-Of: odoo/odoo#105843Steps to reproduce: - go to e-commerce app; - select a product; - try to return to the shop with the browser's back arrow. (if the URL contains `\@\`, is not necessary to click on a "action", otherwise we must) Issue: It is not possible to go back. Cause: Modifying the hash modifies the history of the browser. Solution: Change hash without changing browser history. `window.location.replace` documentation: https://developer.mozilla.org/en-US/docs/Web
Original PR description
Steps to reproduce:
- go to e-commerce app;
- select a product;
- try to return to the shop with the browser's back arrow.
(if the URL contains `\@\`, is not necessary to click on a "action", otherwise we must)
Issue:
It is not possible to go back.
Cause:
Modifying the hash modifies the history of the browser.
Solution:
Change hash without changing browser history.
`window.location.replace` documentation: https://developer.mozilla.org/en-US/docs/Web/API/Location/replace
opw-3061027
Forward-Port-Of: odoo/odoo#105570Fixes UI with warning display over full wizard screen Forward-Port-Of: odoo/odoo#105871
Original PR description
Fixes UI with warning display over full wizard screen Forward-Port-Of: odoo/odoo#105871
In rating/controllers/main.py, the method action_submit_rating accepts only post request. This creates a problem when you're trying to use the web editor on the template as well as when you just paste the url in your browser, for those are get request. The current behavior is a crash with 'method not allowed'. This commit's purpose is to change the method so it also accept get request. The use case of editing the feedback rating page is arguable but it should not crash. The behavior after thi
Original PR description
In rating/controllers/main.py, the method action_submit_rating accepts only post request. This creates a problem when you're trying to use the web editor on the template as well as when you just paste the url in your browser, for those are get request. The current behavior is a crash with 'method not allowed'. This commit's purpose is to change the method so it also accept get request. The use case of editing the feedback rating page is arguable but it should not crash. The behavior after this commit is that the web editor is enable for the page, and reloading the page does not crash anymore. task-3047893 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#105942 Forward-Port-Of: odoo/odoo#104856
**Steps to reproduce :** - Create a BoM with an operation containing 2 passfail Quality Checks - Create an MO with the previously created BoM and confirm it. - Enter in the tablet view of the just created Work Order : - Set the first quality check as 'Pass' - Set the second quality check as 'Fail' **Expected behavior :** - The second step's page update and a new button 'Next' appears. - The user can confirm that the quality check is failed by clicking on the 'Next' button, or he ca
Original PR description
**Steps to reproduce :** - Create a BoM with an operation containing 2 passfail Quality Checks - Create an MO with the previously created BoM and confirm it. - Enter in the tablet view of the just…
**Steps to reproduce :** - Create a BoM with an operation containing 2 passfail Quality Checks - Create an MO with the previously created BoM and confirm it. - Enter in the tablet view of the just created Work Order : - Set the first quality check as 'Pass' - Set the second quality check as 'Fail' **Expected behavior :** - The second step's page update and a new button 'Next' appears. - The user can confirm that the quality check is failed by clicking on the 'Next' button, or he can press 'Pass' to correct a misinput. - He can eventually press again 'Fail' though it's useless. - Either he press 'Next' or 'Pass', as the last step is resolved, the tablet's view updates to 'SummaryStep' **Actual Behavior :** Once the user click 'Fail' on the last step, the tablet's view directly updates to 'SummaryStep'. Any action on the page freeze the view due to an unresolved Promise. https://github.com/odoo/enterprise/blob/316238b28539575d4917265e8e637d2dcda84d32/mrp_workorder/static/src/components/tablet.js#L82-L105 https://github.com/odoo/enterprise/blob/316238b28539575d4917265e8e637d2dcda84d32/mrp_workorder/models/quality.py#L468 When the user sets the QCP as fail, the 'quality_state' variable of the current step pass from 'none' to 'fail'. This enable the condition to call 'createSummaryStep()', whether the 'current_quality_check_id' was not updated, as after clicking on 'Fail' the user wasn't able to click on 'Next' to confirm the QC through the 'action_next' method that do the 'current_quality_check_id' update in the Work Order. https://github.com/odoo/enterprise/blob/316238b28539575d4917265e8e637d2dcda84d32/mrp_workorder/static/src/views/form_view.js#L36-L41 As the user reach 'SummaryStep' with a 'current_quality_check_id' variable that is still set, an unwanted Promise that'll never be resolved is created. As the thread await for the Promise to be resolved, every listeners on the page are "deaf" and the page freeze. Task: 2985735 Forward-Port-Of: odoo/enterprise#33172
This PR goal is for the recurring amount shown in report to actually be the amount recurring and not the total amount. task-id : 3013054 Forward-Port-Of: odoo/enterprise#33233
Original PR description
This PR goal is for the recurring amount shown in report to actually be the amount recurring and not the total amount. task-id : 3013054 Forward-Port-Of: odoo/enterprise#33233
Steps to reproduce: - Install stock_barcode - Create a new storable product with Unique Serial Number tracking - Barcode app > Operations > Receipts > Create - Add the new product, set the serial/lot number value to a long string Issue: The serial/lot number value overflows out of the screen boundaries, pushing the '+1' and 'Edit' buttons outside the viewing area. Fix: Add CSS attribute to break the line on overflow. opw-3000872 Forward-Port-Of: odoo/enterprise#34021 Forward-Port
Original PR description
Steps to reproduce: - Install stock_barcode - Create a new storable product with Unique Serial Number tracking - Barcode app > Operations > Receipts > Create - Add the new product, set the serial/lot number value to a long string Issue: The serial/lot number value overflows out of the screen boundaries, pushing the '+1' and 'Edit' buttons outside the viewing area. Fix: Add CSS attribute to break the line on overflow. opw-3000872 Forward-Port-Of: odoo/enterprise#34021 Forward-Port-Of: odoo/enterprise#33743