Daily updates from Odoo
Navigate
Branch
Thursday, April 8, 2021
6 changes
Code cleanup and technical improvements
This update aligns asset declarations with a platform-wide naming change, replacing the old asset reference wording with the new one. It is an internal cleanup that helps keep the Enterprise codebase compatible with related Odoo updates, with no expected direct impact for users.
Original PR description
Community: https://github.com/odoo/odoo/pull/68695 Design-themes: https://github.com/odoo/design-themes/pull/459 Upgrade: https://github.com/odoo/upgrade/pull/2348
Miscellaneous changes
The query is run every night and could take significant time or even die with timeout error. The heaviest part of the query is few CTE scans. So, this commit replaces WITH-statement with LATERAL joins to allow PG make a better plan Performance Test ================ * postgres 10.5 * Odoo v13 * Odoo.sh deployment * 446 K records in account.move.line * 1 M in res.partner For test we open *Follow-up Reports* menu and measure search_read call. ``` env["res.partner"].with_context(
Original PR description
The query is run every night and could take significant time or even die with timeout error. The heaviest part of the query is few CTE scans. So, this commit replaces WITH-statement with LATERAL…
The query is run every night and could take significant time or even die with
timeout error. The heaviest part of the query is few CTE scans. So, this commit replaces
WITH-statement with LATERAL joins to allow PG make a better plan
Performance Test
================
* postgres 10.5
* Odoo v13
* Odoo.sh deployment
* 446 K records in account.move.line
* 1 M in res.partner
For test we open *Follow-up Reports* menu and measure search_read call.
```
env["res.partner"].with_context(
{"lang":"en_US","tz":"Asia/Bangkok","uid":2,"allowed_company_ids":[1],"params":{"action":420,"cids":1,"menu_id":238,"model":"res.partner","view_type":"list"},"res_partner_search_mode":"customer","bin_size":true}
). search_read(
domain=["|",["parent_id","=",false],["is_company","=",true],"&",["customer_rank",">",0],["followup_status","=","in_need_of_action"]],
fields=["currency_id","name","total_due","total_overdue","followup_status","followup_level","payment_next_action_date","company_id"],
limit=80)
```
```
| | Number of queries | Query time, sec | Remaining time, sec |
|--------+-------------------+-----------------+---------------------|
| Before | 19 | 455.928 | 0.138 |
| After | 19 | 1.169 | 0.136 |
```
---
opw-2467346
close #12214
https://github.com/odoo/enterprise/pull/12214#issuecomment-673431937
Co-authored-by: Denis Ledoux <dle@odoo.com>
Forward-Port-Of: odoo/enterprise#17508
Forward-Port-Of: odoo/enterprise#17428The commit b8c3a20 did not take into account the changes done in the commit 4ee9d2d resulting in a traceback after merging the two of them. This small fix will make sure that the value added in the grid_list is correctly formatted. Also, add two tests targeting the get_xml method to avoid this to happen in the future. Forward-Port-Of: odoo/enterprise#17530
Original PR description
The commit b8c3a20 did not take into account the changes done in the commit 4ee9d2d resulting in a traceback after merging the two of them. This small fix will make sure that the value added in the grid_list is correctly formatted. Also, add two tests targeting the get_xml method to avoid this to happen in the future. Forward-Port-Of: odoo/enterprise#17530
1) Go to Consolidation app > Consolidation > Select a consolidation (eg. "Test chart") 2) Click the "Accounts" smart button 3) If you have selected "BE Company" and "My Company (San Francisco)" in the system you should see some consolidation accounts with mapped accounts from the two companies 4) Select one of these consolidation accounts and uncheck one company in the system 5) Edit the mapped accounts and save 6) Check again the company All mapped accounts of this company are gone.
Original PR description
1) Go to Consolidation app > Consolidation > Select a consolidation (eg. "Test chart") 2) Click the "Accounts" smart button 3) If you have selected "BE Company" and "My Company (San Francisco)" in the system you should see some consolidation accounts with mapped accounts from the two companies 4) Select one of these consolidation accounts and uncheck one company in the system 5) Edit the mapped accounts and save 6) Check again the company All mapped accounts of this company are gone. This occur because when saving the recordset only the current records are kept, discarding the 'hidden' belonging to other companies opw-2449108 Forward-Port-Of: odoo/enterprise#17069
Correction odoo/odoo#68574 already updates the quantity produced in `button_finish`. Since `record_production` calls `button_finish`, upadting the quantity produced is not more usefull. Forward-Port-Of: odoo/enterprise#17517
Original PR description
Correction odoo/odoo#68574 already updates the quantity produced in `button_finish`. Since `record_production` calls `button_finish`, upadting the quantity produced is not more usefull. Forward-Port-Of: odoo/enterprise#17517
The test was failing after https://github.com/odoo/odoo/pull/68492. Before, the VAT check was passing, even though no country was set on the partner, and the VAT number did not contain any country code. Forward-Port-Of: odoo/enterprise#17507
Original PR description
The test was failing after https://github.com/odoo/odoo/pull/68492. Before, the VAT check was passing, even though no country was set on the partner, and the VAT number did not contain any country code. Forward-Port-Of: odoo/enterprise#17507