Friday, January 28, 2022
30 changes · master
Enhancements to existing features
Product-related screens were reorganized to remove duplicate or unused view customizations and make tab and button ordering more consistent across apps. This should make product forms easier to maintain and reduce the risk of inconsistent behavior between product variants and templates, with minimal visible change for users.
Original PR description
## Product views cleanup * Remove duplicate `product.product/product.template` views which should only extend the common view of product.product and product.template once instead of extending once both extensions of the shared view. * Remove views extension without any impact. * Cleanup inheritance targets: the inherited view should contain the targeted modified elements, not its children. * Cleanup View ordering : * Remove ugly `sale_stock` hack to put sales statbutton after stock ones * Use generic priority values to order the product views inheritance #### Incoherences found : - stock : orderpoint access visible only for storable products on product view while it is visible for storable and consumable products on template view. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This change adds supporting accounting fields that make it easier to address performance issues in Aged Receivable reporting. It is an internal improvement intended to help accounting reports run more efficiently without changing day-to-day user workflows.
Original PR description
it simplifies fixing performance issues with Aged Receivable task-2737991 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
The mail message list now calculates its scroll position in a more central place, helping conversations keep the expected position as messages are displayed. This improves the reliability and consistency of the messaging experience without changing user workflows.
Original PR description
task-2579306
Debug-mode access error messages now include the related company name when company-based record rules block records. This helps users and support teams identify which company context to switch to more quickly, while some unused internal rule code was also cleaned up.
Original PR description
In debug mode, when a company ir.rule raise a exception for one or multiple records, a feedback message is display with limited records information. Add company name to these information to help the user to change his current company to the correct one directly. task-2628865
This update standardizes how database indexes are named and handled across several Odoo apps. It also avoids installing the PostgreSQL trigram extension unless it is actually needed, reducing unnecessary setup work while keeping search-related performance support available.
Original PR description
Followup of #83015. The possible values for parameter `index` are now: `"btree"`, `"btree_not_null"` and `"trigram"`. Task 2742526
The mail discussion area now uses a clearer internal structure for dialogs, such as attachment previews. This makes the feature easier to maintain and should support more reliable future improvements without changing the user experience directly.
Original PR description
Properly define relational fields as owner/owning/content. For instance, with viewing attachment in a dialog, the modelling looked roughly like this before the commit: ``` attachment_viewer <----> dialog ``` - where attachment viewer owns dialog This commit changes it to: ``` attachment (image/card) ------> dialog <------> attachment_viewer ``` - where attachment (image/card) owns the dialog, and dialog has attachment viewer as content These changes should make modelling of dialog feels more natural. Task-2738648
Timezone options now show their UTC offset alongside the location name, such as "(UTC+02:00) Europe/Brussels". This makes it easier for users to choose the correct timezone and avoid confusion across regions.
Original PR description
Purpose ======= Display all timezones in Format "(UTC+02:00) Europe/Brussels" instead of just showing "Europe/Brussels". Upgrade: odoo/upgrade/pull/2954 Enterprise: odoo/enterprise/pull/21824 Task-2672237
Mail and snailmail dialog components were updated behind the scenes to support a future framework upgrade. This helps keep messaging features maintainable and reduces upgrade risk without changing the user experience.
Original PR description
In preparation to using OWL 2 in discuss code. Task-2738648
Several product-related screens were simplified by removing duplicate or unnecessary view customizations across enterprise apps. This reduces inconsistencies between product and product template screens, making product setup and related actions more predictable for users.
Original PR description
Remove duplicate product/template views which should only extend the common view of product.product and product.template . Remove views extension without any impact. Incoherences found : - stock : orderpoint access visible only for storable products on product view while it is visible for storable and consumable products on template view. - Enterprise/quality_control : stat buttons are accessible on product.product even if product isn't storable/consumable. Enterprise counterpart of https://github.com/odoo/odoo/pull/35774
Resolved issues and error corrections
Fixes an issue in the Sign app where an error dialog could fail to reload the page as intended. Users who encounter this dialog should now be able to continue with the expected page refresh instead of seeing a browser error.
Original PR description
In sign, when passing window.location.reload as the callback to the openErrorDialog method, an illegal invocation error was happening. This commit adds a wrapper function to it that prevents the error and correctly reloads the page.
Miscellaneous changes
Step to reproduce: - Go to ‘my profile’ - Action "assigned tasks" - Create task Current Behaviour: - Traceback because default assignee is not correclty set up Behaviour after PR: - Correct default assignee - No traceback opw-2742199 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#83466
Original PR description
Step to reproduce: - Go to ‘my profile’ - Action "assigned tasks" - Create task Current Behaviour: - Traceback because default assignee is not correclty set up Behaviour after PR: - Correct default assignee - No traceback opw-2742199 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#83466
Steps to reproduce the bug: - Have company A and B - Create a pricelist A with company A and pricelist B with company B - Select company A as current company and B as allowed company - Create contact A without linked company Problem: You can select pricelist B while the current company is A, this causes an access error if you save and only select company A in the selector. It also causes an error when you open a new POS session. This contact is not linked to a company, so it should b
Original PR description
Steps to reproduce the bug: - Have company A and B - Create a pricelist A with company A and pricelist B with company B - Select company A as current company and B as allowed company - Create contact A without linked company Problem: You can select pricelist B while the current company is A, this causes an access error if you save and only select company A in the selector. It also causes an error when you open a new POS session. This contact is not linked to a company, so it should be accessible from all companies. Solution: Add a domain to allow the user to only select the pricelist linked to the current company or a pricelist that are not linked to a company opw-2745267 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#83487
task-2723819 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#82072
Original PR description
task-2723819 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#82072
Forward-Port-Of: odoo/odoo#83531 Forward-Port-Of: odoo/odoo#83521
Original PR description
Forward-Port-Of: odoo/odoo#83531 Forward-Port-Of: odoo/odoo#83521
Improve `name_get` performance by retrieving `product_template_attribute_value_ids` names in batch before looping on self. The following line can be pretty slow when called inside a for loop. https://github.com/odoo/odoo/blob/f4b7c3eb8138c08873ecc6e23a1bb6cf5b8ceef2/addons/product/models/product_attribute.py#L521 Constructing a ptav name map beforehand makes the call to `_get_combination_name` much faster. #### speed-up Customer database with 30K products and 3 product_template_a
Original PR description
Improve `name_get` performance by retrieving `product_template_attribute_value_ids` names in batch before looping on self. The following line can be pretty slow when called inside a for loop. https://github.com/odoo/odoo/blob/f4b7c3eb8138c08873ecc6e23a1bb6cf5b8ceef2/addons/product/models/product_attribute.py#L521 Constructing a ptav name map beforehand makes the call to `_get_combination_name` much faster. #### speed-up Customer database with 30K products and 3 product_template_attribute_value on average. `product.product.name_get` average time | Number of Products | Before PR | After PR | |:--------------------------:|:---------------:|:-----------:| | 1 | 0.15s | 0.01s | | 25 | 0.07s | 0.02s | | 100 | 0.14s | 0.03s | | 500 | 0.59s | 0.11s | | 2000 | 1.84s | 0.34s | | 10000 | 5.71s | 1.21s | opw-2624261 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#75893
When the assets are regenerated, the previous attachments are deleted. This may happen during the execution of t-call-assets directives in a qweb view. However, some properties that have been accessed with a sudo() were accessible in the cache. Clearing the cache during the view rendering could lead to access errors, which wouldn't be present without this directive. This commit works around this problem by removing these attachments with a SQL query, without relying on the classic unlink,
Original PR description
When the assets are regenerated, the previous attachments are deleted. This may happen during the execution of t-call-assets directives in a qweb view. However, some properties that have been accessed with a sudo() were accessible in the cache. Clearing the cache during the view rendering could lead to access errors, which wouldn't be present without this directive. This commit works around this problem by removing these attachments with a SQL query, without relying on the classic unlink, so that the cache is preserved in this case. By the way, sanitize the filename when marking it for deletion. Forward-Port-Of: odoo/odoo#83527 Forward-Port-Of: odoo/odoo#83341
Current behavior : When modifyin the decimal point and thousands separator in the language you're using the changes where not reflected in the pricelists Steps to reproduce: - Use the language en_US - Set the decimal separator to , instead of . and change the thousand separator from . to , - Use the "activate and translate" smart button, "add" the language and "close and switch to the US language" - Open a pricelist and the pricelist item in the list is with a decimal separator of . inst
Original PR description
Current behavior : When modifyin the decimal point and thousands separator in the language you're using the changes where not reflected in the pricelists Steps to reproduce: - Use the language en_US - Set the decimal separator to , instead of . and change the thousand separator from . to , - Use the "activate and translate" smart button, "add" the language and "close and switch to the US language" - Open a pricelist and the pricelist item in the list is with a decimal separator of . instead of , - But if you click on the item, the separator is correct. PS : I had to duplicate a runbot to reproduce the issue opw-2715993 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#83492 Forward-Port-Of: odoo/odoo#83264
Revert 9f7e6d2bb6ae0a6b0257edf26a5aa069cd00d78e Task-2678388 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#83361 Forward-Port-Of: odoo/odoo#80612
Original PR description
Revert 9f7e6d2bb6ae0a6b0257edf26a5aa069cd00d78e Task-2678388 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#83361 Forward-Port-Of: odoo/odoo#80612
Before this commit, the call participant cards in the sidebar of the call viewer didn't respect the 16:9 aspect ratio on some browsers like chrome. This commit fixes the issue. task-2738622 Forward-Port-Of: odoo/odoo#83346 Forward-Port-Of: odoo/odoo#83310
Original PR description
Before this commit, the call participant cards in the sidebar of the call viewer didn't respect the 16:9 aspect ratio on some browsers like chrome. This commit fixes the issue. task-2738622 Forward-Port-Of: odoo/odoo#83346 Forward-Port-Of: odoo/odoo#83310
Due to some changes in the ORM, the previous implementation doesn't allow the override of a method to be called. Forward-Port-Of: odoo/odoo#83468
Original PR description
Due to some changes in the ORM, the previous implementation doesn't allow the override of a method to be called. Forward-Port-Of: odoo/odoo#83468
Set fec_data to attachment True to avoid storing data ion DB Task: 2453453 Forward-Port-Of: odoo/odoo#80596
Original PR description
Set fec_data to attachment True to avoid storing data ion DB Task: 2453453 Forward-Port-Of: odoo/odoo#80596
Followup of #82838 and #82844 By default, every subclass of BaseModel is registered in a mapping for the automatic discovery of model classes by registries. Prevent registration of the mockup class used for rendering the database manager templates. Forward-Port-Of: odoo/odoo#83597
Original PR description
Followup of #82838 and #82844 By default, every subclass of BaseModel is registered in a mapping for the automatic discovery of model classes by registries. Prevent registration of the mockup class used for rendering the database manager templates. Forward-Port-Of: odoo/odoo#83597
Forward-Port-Of: odoo/enterprise#23809
Original PR description
Forward-Port-Of: odoo/enterprise#23809
Some banks seem to return OFX dates with "00000000" as well as empty tags. We should manage both cases as it shouldn't prevent the import of the file for a non-blocking issue. Forward-Port-Of: odoo/enterprise#23778
Original PR description
Some banks seem to return OFX dates with "00000000" as well as empty tags. We should manage both cases as it shouldn't prevent the import of the file for a non-blocking issue. Forward-Port-Of: odoo/enterprise#23778
After produced less products than planned in workorder tablet view and clicked record_production button. Made the following changes: 1. hide the "continue" button since the workorder is done 2. instead of showing "qty_producing/qty_remaining", show "qty_producing/qty_production" since qty_remaining has been updated. Task-2678388 Forward-Port-Of: odoo/enterprise#23742 Forward-Port-Of: odoo/enterprise#22614
Original PR description
After produced less products than planned in workorder tablet view and clicked record_production button. Made the following changes: 1. hide the "continue" button since the workorder is done 2. instead of showing "qty_producing/qty_remaining", show "qty_producing/qty_production" since qty_remaining has been updated. Task-2678388 Forward-Port-Of: odoo/enterprise#23742 Forward-Port-Of: odoo/enterprise#22614
This is especially useful when a mass action needs to be performed on specific levels only. [task-2726528](https://www.odoo.com/web#id=2726528&model=project.task) Forward-Port-Of: odoo/enterprise#23684
Original PR description
This is especially useful when a mass action needs to be performed on specific levels only. [task-2726528](https://www.odoo.com/web#id=2726528&model=project.task) Forward-Port-Of: odoo/enterprise#23684
No need to use `.html()` here. By chance the alias is formated to avoid expression (see `_sanitize_alias_name`) but don't want to take any risk. Forward-Port-Of: odoo/enterprise#23161
Original PR description
No need to use `.html()` here. By chance the alias is formated to avoid expression (see `_sanitize_alias_name`) but don't want to take any risk. Forward-Port-Of: odoo/enterprise#23161
Steps to follow - Go to accounting > Reporting > Balance sheet - Go back to the home menu - Resize your browser -> $(...).offset() is undefined Cause of the issue The event listener was not correctly unregistered Solution Use `on_detach_callback` instead of `destroy` Forward-Port-Of: odoo/enterprise#23352
Original PR description
Steps to follow - Go to accounting > Reporting > Balance sheet - Go back to the home menu - Resize your browser -> $(...).offset() is undefined Cause of the issue The event listener was not correctly unregistered Solution Use `on_detach_callback` instead of `destroy` Forward-Port-Of: odoo/enterprise#23352
The general ledger is showing tax reports line when only selecting a single journal of type sale or purchase. The issue is that the method called only exists on the tax report and not the general ledger, so it gives a traceback. This is fixed by adding a method calling the correct one in the tax report from the general ledger. Forward-Port-Of: odoo/enterprise#23806
Original PR description
The general ledger is showing tax reports line when only selecting a single journal of type sale or purchase. The issue is that the method called only exists on the tax report and not the general ledger, so it gives a traceback. This is fixed by adding a method calling the correct one in the tax report from the general ledger. Forward-Port-Of: odoo/enterprise#23806
Steps : - config : { "--init=hr,hr_contract", "--without-demo=all", } - Employees > Reporting > Contracts (Dashboard view) - Pivot section > Measures : Date Last Contract Ended Issue : - Whatever the measure value is, an Odoo Client Error occurs. Cause : - the dashboard aggregate "Date Last Contract Ended" is wrongly added to the list additionalMeasures passed to its subviews. Fix : - We restore the original dashboard behavior: we only add aggregates that are many2o
Original PR description
Steps :
- config : {
"--init=hr,hr_contract",
"--without-demo=all",
}
- Employees > Reporting > Contracts (Dashboard view)
- Pivot section > Measures : Date Last Contract Ended
Issue :
- Whatever the measure value is, an Odoo Client Error occurs.
Cause :
- the dashboard aggregate "Date Last Contract Ended" is wrongly added
to the list additionalMeasures passed to its subviews.
Fix :
- We restore the original dashboard behavior: we only add aggregates
that are many2one in additionalMeasures.
opw-2728024
Forward-Port-Of: odoo/enterprise#23699