Wednesday, May 19, 2021
31 changes · master
Enhancements to existing features
The quick search dropdown now shows selection and yes/no field values on the same line as the search label. This makes options easier to scan and choose, improving everyday navigation in Odoo lists and views.
Original PR description
Currently, the selection field and boolean field values are displays
below the string 'search for: '
like, Search status for: input value
New
Running
Cancelled
so, this commit improves the quick search dropdown by displaying the
selection field and boolean field value and strings in the same line
like, Search Status: New
Search Status: Running
Search Status: Cancelled
TaskID-2462138This update improves performance by caching regional tax position lookups that are used frequently, such as when showing product prices in the online shop. Customers and staff should experience faster page loading and pricing calculations, especially on pages with many products.
Original PR description
'_get_fpos_by_region' is called quite regularly (once per product to compute the price on website "/shop" for example). This is master data that hardly changes, the cache saves a significant amount of time. Refactoring how to get information might improve performance and no longer require this cache. 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 module now retrieves message recipient data much more efficiently when databases contain very large numbers of contacts and followers. This reduces delays in notification-related processing and can improve responsiveness for customers with high-volume communication data.
Original PR description
Previous implementation with WHERE EXISTS works slowly with big res_partner
table. So, use JOIN explicitly.
Also, check simpler condition first (partner.id in (123,456,)).
It's ok to keep WHERE EXISTS for mail_channel, because it's unlikely to have
many records there.
TEST:
1. populate partners and followers
```
records = env['res.partner']
for num in range(1, 1333000):
partner = env['res.partner'].create({'name': "dummy %s" % num})
for r in records:
devnull = r.message_subscribe(partner.ids)
records |= partner
if len(records) > 5:
records = records[3:]
if not num % 10000:
print(num)
env.cr.commit()
```
2. add time measuring for _get_recipient_data
3. run test
-i test_mail --test-tags /test_mail:DuplicateNotificationTest
MY RESULTS:
* 600K records in res.partner
* 3M records in mail.followers
* _get_recipient_data:
* BEFORE: 1.7 sec
* AFTER: 0.003 sec
---
opw-2411637Website forms now show a loading spinner while files are uploading, so visitors know their submission is in progress. If an uploaded file is too large, the visitor receives a specific error message instead of a vague failure notice.
Original PR description
If a visitor tries to send a file too large, they will get a message after a while that an error occurred. This isn't specific enough. Now when a visitor sends a form, a spinner will appear indicating that the file is being uploaded. If the upload fails because the file is too large, the user will be notified. task-2234699
Time entries now automatically display in the standard hours-and-minutes format when users move away from the field, instead of waiting until the record is saved. This makes forms feel more polished and reduces confusion about whether the entered time was accepted correctly.
Original PR description
PURPOSE Currently, the input set in a 'Time' widget (float_time) is only formatting in to hh:mm when saving the record. This looks awkward and buggy. The purpose of this task is to format the content of the float_time widget when it loses focus (i.e. on field blur). SPECIFICATION Format the content of the float_time widget on field blur. TASK 2518730 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Manufacturing work order duration fields now use a time-friendly format, making durations easier to read and enter. This small usability improvement helps users work with time values more naturally and reduces confusion when reviewing or updating production operations.
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
Payment administrators can now choose the order in which payment method icons appear on the payment page. This makes it easier to highlight preferred payment options instead of relying on the system's default record order.
Original PR description
The user can reorder the payment method to put his favorite forth on their /payment page.. Description of the issue/feature this PR addresses: There is currently no forced ordering of payment icon records, meaning that they are ordered by DB ID. Current behavior before PR: Inside each acquirer's card on the payment form you can find a list of supported payment icons. It's initially collapsed so that it only shows the *first* three icon assigned to an acquirer. Desired behavior after PR is merged: Allow users to decide in which order payment method should appear on their /payment page. He can reorder them in the payment icon list, in debug mode. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Users can now retry failed or canceled SMS messages directly from the SMS form, and resend multiple failed messages at once from the list view. This reduces manual follow-up work and makes it easier to recover from SMS delivery failures.
Original PR description
PURPOSE If the user send SMS automatically and doesn't pay attention that the sending of his SMS is failing, he has to go through each record one by one to resend the SMS. An action to resend all of…
PURPOSE
If the user send SMS automatically and doesn't pay
attention that the sending of his SMS is failing,
he has to go through each record one by one to
resend the SMS. An action to resend all of the
failed SMS in batch would ease the process.
SPECIFICATION
by sending SMS one by one is a heavy process if
message in a bulk, and in the form view if the SMS
failed there are no option to resend that message or
put that message again in outgoing state.
so for this problem we are adding a resend button in
form view and it's visible only in error or canceled
state, by clicking this the message will be in outgoing
state so user can resend the message.
and if there are lots of failed messages in the tree view
than user can select the failed messages and from the tree view
it can resend all the messages directly.
Task Id:2465233
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-prThe Planning app onboarding tour has been updated with additional steps and revised guidance. This helps new users understand the app more easily and complete initial setup or key actions with clearer in-product instructions.
Original PR description
A few steps have been added and some other revised on the planning app existing tour. task-2516342
Resolved issues and error corrections
The Inventory Adjustments view now shows the correct action name. This removes a small labeling inconsistency, making the stock management interface clearer for users.
Original PR description
User correct name for action on Inventory Adjustments view. 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
Miscellaneous changes
some message are not translated. Fix them. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#68223
Original PR description
some message are not translated. Fix them. -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#68223
Manufacturing orders can now be confirmed even when they have no components, and replenishment through manufacturing no longer requires a bill of materials. This prevents replenishment quantities from accumulating incorrectly in draft orders and supports simpler manufacturing flows.
Original PR description
This PR does 2 things: 1. Removes the component requirement for manufacturing orders to be confirmed (+all other non-draft states) 2. Removes the BoM requirement for replenishment via the manufacture route. Additional details for both implementations are in their respective commit files. Task: 2422698 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This change fixes an installation error in the India localization module by placing the India-specific unit-of-measure code field in the correct view. Businesses using the India localization can install or update the module without this setup failure blocking configuration.
Original PR description
Traceback was occurring while installing the I10n_in module but installation was incomplete due to the same reason. However, the issue resolved in this commit by adding xpath to form view on relational field. Task - 2515007 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
Payslip validation has been corrected so users no longer encounter an unexpected error during payroll processing. This helps payroll teams complete validations more reliably and reduces interruptions in routine payroll work.
Original PR description
Fixes a traceback on payslip validation.
When there is a materialized view that has not been populated any select on it will fail. Example of traceback: ``` Traceback (most recent call last): File "/home/odoo/src/odoo/12.0/odoo/service/server.py", line 1162, in preload_registries registry = Registry.new(dbname, update_module=update_module) File "/home/odoo/src/odoo/12.0/odoo/modules/registry.py", line 86, in new odoo.modules.load_modules(registry._db, force_demo, status, update_module) File "/home/odoo/src/odoo
Original PR description
When there is a materialized view that has not been populated any select on it will fail. Example of traceback: ``` Traceback (most recent call last): File…
When there is a materialized view that has not been populated any select
on it will fail.
Example of traceback:
```
Traceback (most recent call last):
File "/home/odoo/src/odoo/12.0/odoo/service/server.py", line 1162, in preload_registries
registry = Registry.new(dbname, update_module=update_module)
File "/home/odoo/src/odoo/12.0/odoo/modules/registry.py", line 86, in new
odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "/home/odoo/src/odoo/12.0/odoo/modules/loading.py", line 367, in load_modules
registry.setup_models(cr)
File "/home/odoo/src/odoo/12.0/odoo/modules/registry.py", line 262, in setup_models
env['ir.model']._add_manual_models()
File "/home/odoo/src/odoo/12.0/odoo/addons/base/models/ir_model.py", line 321, in _add_manual_models
cr.execute('SELECT * FROM %s LIMIT 0' % Model._table)
File "/home/odoo/src/odoo/12.0/odoo/sql_db.py", line 148, in wrapper
return f(self, *args, **kwargs)
File "/home/odoo/src/odoo/12.0/odoo/sql_db.py", line 225, in execute
res = self._obj.execute(query, params)
psycopg2.errors.ObjectNotInPrerequisiteState: materialized view "x_bi_sql_view_report_copy" has not been populated
HINT: Use the REFRESH MATERIALIZED VIEW command.
```
Several upgrade requests have or had had this error which has been
solved with specific scripts.
Related to #40930
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#69367Issue Use Safari (or equivalent) browser - Install e-commerce - Go to Website -> Configuration -> Payment Acquirers - Activate Ingenico in test mode (write aaa in required fields) - Go to shop, and add product to card - Go to checkout - Select Ingenico payment mode - Click on Pay button - When on the ingenico page, press back The page is blocked and the button is disabled. Cause When clicking on Pay button, the page is locked and the button is disabled.
Original PR description
Issue
Use Safari (or equivalent) browser
- Install e-commerce
- Go to Website -> Configuration -> Payment Acquirers
- Activate Ingenico in test mode
(write aaa in required fields)
- Go to shop, and add product to card
- Go to checkout
- Select Ingenico payment mode
- Click on Pay button
- When on the ingenico page, press back
The page is blocked and the button is disabled.
Cause
When clicking on Pay button, the page is locked and
the button is disabled.
With Chrome, when coming back to previous page,
this one is regenerated and therefore adapt the button.
In Safari, it is not the case.
Solution
On `pageshow` event, if event have `persisted` attribute set to
to true, meaning using cache, then reload page.
opw-2510281
Forward-Port-Of: odoo/odoo#70844
Forward-Port-Of: odoo/odoo#69725Description of the issue/feature this PR addresses: before this commit: _adapt_parent_account_group or _adapt_parent_account_group call with multi-company record then raise singleton error after this commit: singleton error is fixed -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#70817 Forward-Port-Of: odoo/odoo#69323
Original PR description
Description of the issue/feature this PR addresses: before this commit: _adapt_parent_account_group or _adapt_parent_account_group call with multi-company record then raise singleton error after this commit: singleton error is fixed -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#70817 Forward-Port-Of: odoo/odoo#69323
To reproduce: 1. create and confirm a MO with register number checks on operations 2. duplicate the MO The register number checks won't show up in the new MO We didn't set copy=False for workorder_id on stock.move, when copy a confirmed MO, the new moves are linked to old WOs on old MO. New WO didn't link to any moves. When create quality checks, we only create "register ..." checks for WOs with move_id. As a result, new WOs without move_id won't have those checks. To fix, set copy=F
Original PR description
To reproduce: 1. create and confirm a MO with register number checks on operations 2. duplicate the MO The register number checks won't show up in the new MO We didn't set copy=False for workorder_id on stock.move, when copy a confirmed MO, the new moves are linked to old WOs on old MO. New WO didn't link to any moves. When create quality checks, we only create "register ..." checks for WOs with move_id. As a result, new WOs without move_id won't have those checks. To fix, set copy=False on workorder_id of stock.move Task 2484939 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#68348
PURPOSE Prevent browsers from suggesting date(time) that have been used in the past. Indeed, chances are those where used at a specific time and aren't of any use later on. SPEC On the back-end, block browsers (Chrome, Firefox and if possible others such as Brave, Edge, ... => Not sure if it's browser-specific) from displaying this autocomplete popup. It should still work on the Website TASK 2462676 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/s
Original PR description
PURPOSE Prevent browsers from suggesting date(time) that have been used in the past. Indeed, chances are those where used at a specific time and aren't of any use later on. SPEC On the back-end, block browsers (Chrome, Firefox and if possible others such as Brave, Edge, ... => Not sure if it's browser-specific) from displaying this autocomplete popup. It should still work on the Website TASK 2462676 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#68271
On unbuild order creation, when the user selects a manufacturing order, the UoM of the quantity will be defined with the product's UoM instead of MO's UoM. To reproduce the error: (Use demo data) 1. In Settings > General Settings, enable "Units of Measure" 2. Create two products P_finished and P_compo - Both are storable - Qty on Hand of P_compo = 12 3. Create a Bill of Material - Product: P_finished - Component: 1 x P_compo 4. Create a Manufacturing Order MO -
Original PR description
On unbuild order creation, when the user selects a manufacturing order, the UoM of the quantity will be defined with the product's UoM instead of MO's UoM. To reproduce the error: (Use demo data) 1.…
On unbuild order creation, when the user selects a manufacturing order,
the UoM of the quantity will be defined with the product's UoM instead
of MO's UoM.
To reproduce the error:
(Use demo data)
1. In Settings > General Settings, enable "Units of Measure"
2. Create two products P_finished and P_compo
- Both are storable
- Qty on Hand of P_compo = 12
3. Create a Bill of Material
- Product: P_finished
- Component: 1 x P_compo
4. Create a Manufacturing Order MO
- Product: P_finished
- Quantity To Produce: 1 Dozen(s)
5. Check Availability, Produce, Mark as Done
6. Create an Unbuild Order:
- Manufacturing Order: MO
Error: The unit of measure of the quantity is incorrect, this is
Unit(s), it should be Dozen(s)
The method `onchange_mo_id` defines the product, therefore the method
`onchange_product_id` is also called and here is the issue:
`onchange_product_id` will override the UoM using the product's UoM.
OPW-2467017
Forward-Port-Of: odoo/odoo#70955
Forward-Port-Of: odoo/odoo#70761Description 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#70981
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#70981
Prior to this commit, the default stage didn't follow the value of the display project id as the project_id was only updated after the write call. This commit makes the project_id to be updated after the display project id changes. This allows the default stage to be updated too once the onchange is done. task-2522066 Description of the issue/feature this PR addresses: Current behavior before PR: Desired behavior after PR is merged: -- I confirm I have signed the CL
Original PR description
Prior to this commit, the default stage didn't follow the value of the display project id as the project_id was only updated after the write call. This commit makes the project_id to be updated after the display project id changes. This allows the default stage to be updated too once the onchange is done. task-2522066 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#70576
In https://github.com/odoo/odoo/pull/52529/commits/078a3a0f760ff24d02070a343f28d2249a8b5ba7#diff-c217a13a40a3cc27dc516b899793abecfac8cab9a42fed407d4776bcbc9de9a8R812 the way the percentage is calculated is changed. This implies that a reconciliation rule allowing a 90% matching amount will not allow to reconcile a 90$ bank statement with a 100$ invoice (as it will calculate the % as 88.89%, not meeting the required 90 %) After cited commit: invoice 200, bank statement 180: (|-180| - |20|
Original PR description
In https://github.com/odoo/odoo/pull/52529/commits/078a3a0f760ff24d02070a343f28d2249a8b5ba7#diff-c217a13a40a3cc27dc516b899793abecfac8cab9a42fed407d4776bcbc9de9a8R812 the way the percentage is…
In https://github.com/odoo/odoo/pull/52529/commits/078a3a0f760ff24d02070a343f28d2249a8b5ba7#diff-c217a13a40a3cc27dc516b899793abecfac8cab9a42fed407d4776bcbc9de9a8R812 the way the percentage is calculated is changed. This implies that a reconciliation rule allowing a 90% matching amount will not allow to reconcile a 90$ bank statement with a 100$ invoice (as it will calculate the % as 88.89%, not meeting the required 90 %) After cited commit: invoice 200, bank statement 180: (|-180| - |20|) / |-180| * 100 = 88.89% invoice 200, bank statement 220: (|-220| - |-20|) / |-220| * 100 = 90.91% credit note 200, bank statement -180: (|180| - |-20|) / |180| * 100 = 88.89% credit note 200, bank statement -220: (|220| - |20|) / |220| * 100 = 90.91% Now: invoice 200, bank statement 180: 100 - |20| / |(-180 - 20)| * 100 = 90% invoice 200, bank statement 220: 100 - |-20| / |(-220 - -20)| * 100 = 90% credit note 200, bank statement -180: 100 - |-20| / |(180 - -20)| * 100 = 90% credit note 200, bank statement -220: 100 - |20| / |(220 - 20)| * 100 = 90% Task: 2427089 Forward-Port-Of: odoo/odoo#70948
This commit updates owl to the latest release. It only contains a small fix to the router (route params handling) Release on github: https://github.com/odoo/owl/releases/tag/v1.2.6 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#71023
Original PR description
This commit updates owl to the latest release. It only contains a small fix to the router (route params handling) Release on github: https://github.com/odoo/owl/releases/tag/v1.2.6 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#71023
- Enable 'product configurator' and 'variant grid entry' - Go to product [DEMO]: - Add an optional product. - Go to the variants tab and add some variants - Select 'order grid entry' - Remove all the variants - Create a SO adding [DEMO] Traceback will occur opw-2439764 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/
Original PR description
- Enable 'product configurator' and 'variant grid entry' - Go to product [DEMO]: - Add an optional product. - Go to the variants tab and add some variants - Select 'order grid entry' - Remove all the variants - Create a SO adding [DEMO] Traceback will occur opw-2439764 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#71024
Manually adding a line should not trigger the computation of the field, just like modifying the line fields that occur in the field's domain. In other words, the dependencies of the field should be limited to the ones declared on field or its compute method. Forward-Port-Of: odoo/odoo#71027 Forward-Port-Of: odoo/odoo#70773
Original PR description
Manually adding a line should not trigger the computation of the field, just like modifying the line fields that occur in the field's domain. In other words, the dependencies of the field should be limited to the ones declared on field or its compute method. Forward-Port-Of: odoo/odoo#71027 Forward-Port-Of: odoo/odoo#70773
steps to produce entry:- - create an expense that is paid by the company - then create and approve a report - then post entries, 2 entries are created. 1 is posted and is correct, the other one is in the draft and should not be there expected:- - this draft entry is actually the payment to reimburse the employee - However, the company-funded expense is never reimbursed to the employee an expense report cannot contain company and employee-funded expenses. - When the report is compa
Original PR description
steps to produce entry:- - create an expense that is paid by the company - then create and approve a report - then post entries, 2 entries are created. 1 is posted and is correct, the other one is in the draft and should not be there expected:- - this draft entry is actually the payment to reimburse the employee - However, the company-funded expense is never reimbursed to the employee an expense report cannot contain company and employee-funded expenses. - When the report is company-funded there shouldn't be any payment entry to reimburse the employee by this commit, draft entry is removed when payment paid by the company task - 2410551 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#69875
PURPOSE The tour bubble message "Write a message to get a preview of your post" attaches itself to the comment field on the post form view and in the modal opens from the kanban card. It should not appear in the modal to consume that process, it should attaches only to the comment field on the post form view. SPECIFICATION The tour bubble message "Write a message to get a preview of your post" attaches itself only to the comment field on the post form view, by this commit it will not
Original PR description
PURPOSE The tour bubble message "Write a message to get a preview of your post" attaches itself to the comment field on the post form view and in the modal opens from the kanban card. It should not appear in the modal to consume that process, it should attaches only to the comment field on the post form view. SPECIFICATION The tour bubble message "Write a message to get a preview of your post" attaches itself only to the comment field on the post form view, by this commit it will not appear in the modal opens from the kanban view. LINKS PR #18243 Task 2525562 Forward-Port-Of: odoo/enterprise#18243
Steps to reproduce: * Create a prepaid service that creates a task in Field Service project. * Create a SO for this service and confirm it. * Open the task, record some time and mark the task as done Observed behavior: * The SOL on the task was updated to a newly created SOL for the default service product. Expected behavior: * The task SOL should not be updated if already set. task-2532512 Forward-Port-Of: odoo/enterprise#18370
Original PR description
Steps to reproduce:
* Create a prepaid service that creates a task in Field Service project.
* Create a SO for this service and confirm it.
* Open the task, record some time and mark the task as done
Observed behavior:
* The SOL on the task was updated to a newly created SOL
for the default service product.
Expected behavior:
* The task SOL should not be updated if already set.
task-2532512
Forward-Port-Of: odoo/enterprise#18370Only show the uninstall alert when web_studio is being uninstalled (the missing `&` in the domain meant that if custom_fields or custom_views or custom_reports were not 0, the alert would be shown even when installing a module other than web_studio). opw-2528797 Forward-Port-Of: odoo/enterprise#18388
Original PR description
Only show the uninstall alert when web_studio is being uninstalled (the missing `&` in the domain meant that if custom_fields or custom_views or custom_reports were not 0, the alert would be shown even when installing a module other than web_studio). opw-2528797 Forward-Port-Of: odoo/enterprise#18388
Forward-Port-Of: odoo/enterprise#18374 Forward-Port-Of: odoo/enterprise#18351
Original PR description
Forward-Port-Of: odoo/enterprise#18374 Forward-Port-Of: odoo/enterprise#18351