Monday, April 17, 2023
9 changes · master
Enhancements to existing features
This update brings Odoo's spreadsheet component up to a newer version with improvements to menus, icons, sizing, and read-only behavior. It also fixes issues that could affect spreadsheet display and interaction, making reports and dashboards more reliable for users.
Original PR description
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/6824b8a1 [REL] 16.3.0-alpha.4 https://github.com/odoo/o-spreadsheet/commit/9b911f61 [FIX] tests: fix indeterministic…
### Contains the following commits: https://github.com/odoo/o-spreadsheet/commit/6824b8a1 [REL] 16.3.0-alpha.4 https://github.com/odoo/o-spreadsheet/commit/9b911f61 [FIX] tests: fix indeterministic ui sheet https://github.com/odoo/o-spreadsheet/commit/f20b7be5 [FIX] demo: Align font family with Odoo Task: 3269724 https://github.com/odoo/o-spreadsheet/commit/49a5ee0e [FIX] ColorPicker: Fix checkmark symbol Task: 3269724 https://github.com/odoo/o-spreadsheet/commit/4f2ecfec [REM] menu: remove icons on menu items https://github.com/odoo/o-spreadsheet/commit/54fca81f [REF] *: rename 'menuItem' files to 'action' files https://github.com/odoo/o-spreadsheet/commit/5c23e084 [REF] *: Change names of type 'MenuItem' to 'Action' https://github.com/odoo/o-spreadsheet/commit/e5007fd1 [REF] replace xml tool bar in the xml top bar by menu item buttons https://github.com/odoo/o-spreadsheet/commit/950abc45 [REF] menu registry: factorize menu registries by menu items https://github.com/odoo/o-spreadsheet/commit/c02a7e96 [IMP] topbar menu: add icons for conditional menu items https://github.com/odoo/o-spreadsheet/commit/a19d9cac [IMP] topbar menu: add icons for static menu items https://github.com/odoo/o-spreadsheet/commit/7825124c [IMP] menu: replace right text icon by left icon https://github.com/odoo/o-spreadsheet/commit/be3c3d6f [FIX] viewport: infinite loop with hidden headers https://github.com/odoo/o-spreadsheet/commit/c05be1de [FIX] github: update release-action to latest version https://github.com/odoo/o-spreadsheet/commit/9fdbdab2 [FIX] sheetview: correctly auto-size spreadsheet https://github.com/odoo/o-spreadsheet/commit/7d18b589 [IMP] bottom_bar: hide add sheet button in readonly mode https://github.com/odoo/o-spreadsheet/commit/108b89bd [FIX] menus: don't open submenu is not readonly https://github.com/odoo/o-spreadsheet/commit/1edbc157 [FIX] top bar: remove useless "Save" menu item
Odoo now identifies and stores tax-related XSD files more reliably, reducing the risk that files with the same name are mixed up. It also avoids saving unnecessary ZIP archives and adds a manual download option instead of relying on scheduled downloads, making the process cleaner and more controlled.
Original PR description
WIP Currently, saving/fetching XSD attachments is only based on the attachment's name. This means that multiple attachments can share the same name, leading to possible collision. This commit aims at improving the whole process of fetching XSD attachments from DB by: (1) reducing the collision chance (2) handling the case when collision still happens (3) simplifying/generalizing the use of the load_xsd_files_from_url function, which allows: (4) not saving ZIP archives, only saving required XSD files inside These improvements are implemented as follows: (1) fetch based on XSD name, url and type, and enforce a prefix to all file names (2) return only one attachment when multiple match the description (the most recently updated one) (3) rewrite function definition and use a dictionary to provide needed information (4) do just that [Enterprise PR](https://github.com/odoo/enterprise/pull/35456) task id=3010716
Spreadsheet dashboard period filters now count the current day in ranges such as "Last 7 Days." This makes dashboard results match business expectations by including today's activity instead of ending at yesterday.
Original PR description
### Description of the issue/feature this PR addresses: This PR includes the ongoing day in the current period filters. ### Current behavior before PR: The periods in dashboard period filters don't include the ongoing day (today). For example, today is May 16th. "Last 7 Days" means May 9th 00:00 - May 15th 23:59. ### Desired behavior after PR is merged: "Last 7 Days" of May 16th refers to May 10th 00:00 - May 16th 23:59. task [3267525](https://www.odoo.com/web#id=3267525&cids=1&menu_id=4720&action=333&active_id=2328&model=project.task&view_type=form) --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Product searches were adjusted to avoid an expensive translated-name sort when retrieving products. This can make product lists and related operations load much faster, especially in databases using multiple languages.
Original PR description
1. Install and configure a language 2. Run the following sentence: `env['product.product'].search([], limit=10)` 3. Analyze the query executed: ```sql SELECT "product_product".id FROM…
1. Install and configure a language
2. Run the following sentence: `env['product.product'].search([], limit=10)`
3. Analyze the query executed:
```sql
SELECT "product_product".id
FROM "product_product"
LEFT JOIN "product_template" AS "product_product__product_tmpl_id"
ON ( "product_product"."product_tmpl_id" =
"product_product__product_tmpl_id"."id" )
LEFT JOIN (SELECT res_id,
value
FROM "ir_translation"
WHERE type = 'model'
AND name = 'product.template,name'
AND lang = 'es_MX'
AND value != '') AS
"product_product__product_tmpl_id__name"
ON ( "product_product__product_tmpl_id"."id" =
"product_product__product_tmpl_id__name"."res_id" )
WHERE ( "product_product"."active" = true )
ORDER BY "product_product"."default_code",
Coalesce("product_product__product_tmpl_id__name"."value",
"product_product__product_tmpl_id"."name"),
"product_product"."id"
LIMIT 10
```
Planning Time: 1.088 ms
Execution Time: 1027.282 ms
Total Time: 1028.37 ms
It is so slow.
Now, change the `_order = 'default_code'`
Analyze the query executed:
```sql
SELECT "product_product".id
FROM "product_product"
WHERE ( "product_product"."active" = true )
ORDER BY "product_product"."default_code"
LIMIT 10
```
Planning Time: 0.095 ms
Execution Time: 0.529 ms
Total Time: 0.624 ms
It is 1.65k times faster
It is because the field `name` has the parameter `translate=True`
So, It will process the original value to translate it
And it has `_order = 'default_code, name'`
Then, It will order by a column computed on-the-fly
of another table (product.template)
An inner join is required and an order by a non-index column
So, it is so slow.
But the first order is default_code, so most of cases the result
will be same than without use "name" column
# Additional information
Opening `/shop` page of our customer before this patch:
- 7.5s
After this patch:
- 1.2sThe e-invoicing proxy setup has been made less dependent on the older EDI format structure, making it more flexible for future services such as Peppol. Italian e-invoicing keeps the format-specific behavior it still needs today, while the shared proxy layer can now manage users more cleanly per company and mode.
Original PR description
Edi format is going to be removed eventually - `account_edi_proxy_client` should not depend on it and be more flexible in general. This commit: - Removes edi_format field from `account_edi_proxy_client.user` model. We still have to add them in `l10n_it_edi` as it still heavily relies on edi format for now. - Adds a way to have a unique edi user per company, proxy user, edi mode combination. This is a necessary step before adding peppol, which will also depend on the account_edi_proxy_client also see: https://github.com/odoo/iap-apps/pull/580 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update changes how electronic reporting validation files are downloaded and found, reducing the chance of using the wrong file. Scheduled automatic downloads are replaced or limited in favor of a manual download option, while missing validation files no longer block XML processing.
Original PR description
WIP This commit follows the commit in community that improves/modifies XSD loading functions. The overall goal is to reduce the collision chance when fetch XSD attachments from DB. The modified functions require stricter parameters to be provided, and this commit implements the required modifications. Also removes the CRON and adds a button that does the same job (i.e. downloads the XSD files). If an XSD file is missing when trying to validate an XML, then the validation is simply skipped. XSD validation should mainly be done during the development process, so we avoid doing it all the time and leave the possibility to the user to still download the XSD files, which will then enable the validation. [Community PR](https://github.com/odoo/odoo/pull/109160) task id=3010716
The spreadsheet components have been updated to a newer library version, bringing improvements across documents, dashboards, lists, pivots, filters, and menus. This helps keep spreadsheet-based workflows more reliable and aligned with the latest capabilities used across Odoo.
Original PR description
…alpha.4
Project and field service task views now show a row for relevant users even when they have no task in the current view. This helps managers spot available team members who recently had planned work or still have open tasks in the selected project.
Original PR description
Display an empty line for each user that: \- has an open task assigned in the project (only applicable when viewing the tasks of a specific project) \- was planned a task in the past 7 days task-3142165
Products can no longer be linked to a workspace template that belongs to a different company. This helps avoid cross-company setup mistakes that could cause document or project workflows to behave incorrectly.
Original PR description
This PR adds a check preventing setting a different company on a product and its workspace template, thus avoiding potential multi-company issues. Task-3186695