Friday, July 24, 2020
19 changes · master
Enhancements to existing features
Odoo can now show selected server actions as buttons directly in the list view control panel instead of hiding them in the action menu. This makes common actions faster to access across areas such as accounting, CRM, expenses, manufacturing, purchasing, stock, and lunch.
Original PR description
PURPOSE We want to enable the framework to define some of those server actions in the controlpanel, same as buttons like 'create/edit/discard' buttons. SPECIFICATION - added a display_in_controlpanel Boolean field in ir.actions.server - server action with this field having true value will be shown as button in list view and that also displayed when user selects the record from the list view and that action will not be shown in action menu LINKS PR https://github.com/odoo/odoo/pull/52425 Task 2246383 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The search panel has been rebuilt using Odoo’s newer interface framework, making it easier to maintain and better aligned with future product improvements. Related search, filtering, favorites, and Lunch app location behavior were reorganized behind the scenes so users get a more consistent search experience across views.
Original PR description
The first aim of the present work consists in the conversion of the SearchPanel widget to a OWL component. Along the way we have introduced many changes/novelties in the js framework, most notably in…
The first aim of the present work consists in the conversion of the SearchPanel widget to a OWL component. Along the way we have introduced many changes/novelties in the js framework, most notably in the class Model (module addons/web/static/src/js/model.js). Here is a more detailed account of what has been done: - Model (and ModelExtension): refactoring of the Model class to support multiple extensions. The purpose is to build a model having the appropriate extensions (or plugins) for a given situation. The control panel model has now become an 'extension' (ModelExtension instance) of a 'search model' (Model instance). That extension manages the filters/groubys/favorites statuses and is added only when a control panel is used by a view/action. The search model itself generates the domain, contexts, groupbys,... using the different parts coming from the added extensions. That model is meant to replace the view model in the long term. It might however need some improvements to hold such a role (partial interface rendering, etc.). - SearchPanel: the previous search panel widget has been divided in 2 parts: 1. a SearchPanel part: a component whose responsibilities are now to render the search panel data given by its corresponding model extension, display some rendering logic (expanded categories, checked groups) and dispatch the events triggered on it. 2. a SearchPanelModelExtension part: a model extension that holds all the search logic of the search panel. Its responsibilities are calling the server to update its data and to provide them to the search panel component and the other search extensions via the search model. - LunchModelExtension: conversion of the LunchModel to a proper model extension. The lunch "location" logic (locationId and userId) has been transferred to a new model extension (LunchModelExtension) which provides an additional domain part to the global query. - Registry: before this commit, any value could be added to a registry and the class needed to be overridden to assert that an added value would have some properties. Now, a registry can be instantiated with a given predicate function that all added values must "pass" to be registered (default: all values are accepted). This has been introduced here in order to be able to control the type of extensions added to a given model. Task ID: 2228968 Co-authored-by: Julien Mougenot <jum@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Odoo’s internal field cache was reorganized to use less memory and speed up common operations across many records. This should improve overall performance and resource usage without changing user-facing workflows.
Original PR description
Consider a context-dependent field and two possible cache structures for storing the data of that field for N records and K context keys. The common use-case is to assume that N is much larger than…
Consider a context-dependent field and two possible cache structures for storing the data of that field for N records and K context keys. The common use-case is to assume that N is much larger than K. We look at how many dicts are used in each cache structure, where we label dicts with N entries as "large", and dicts with K entries as "small".
Structure | Number of dicts
---------------------------+-------------------
cache[field][id][key] | 1 large + N small
cache[field][key][id] | 1 small + K large
It is known that "small" dicts have a large relative overhead when compared to "large" dicts. Given this fact, the second cache structure will generate less memory overhead. Here are numbers for N=16, showing the size in bytes taken by the cache structure. Larger values of N lead to larger size differences, always in favor of the second structure.
Structure | K=1 | K=2 | K=3 | K=4 | K=5 | K=6
-----------------------+------+------+------+------+------+------
cache[field][id][key] | 4488 | 4488 | 4488 | 4488 | 4488 | 6536
cache[field][key][id] | 888 | 1536 | 2184 | 2832 | 3480 | 4256
Moreover, some memory operations are performed on many records and a single context key. Those operations are clearly simpler and faster with the second cache structure.Grouped rows in list views now use tighter spacing and better caret alignment. This makes grouped lists look cleaner and more consistent, especially when selection checkboxes are shown.
Original PR description
This PR changes a bit the style of groups in list view * reduced padding-top/bottom of group headers to 5px * increased the padding-left by 2px of carets to align them with selection checkboxes (in enterprise) Task 2301397 ENT PR: https://github.com/odoo/enterprise/pull/11955
The search panel has been modernized across enterprise apps to align with Odoo's newer interface framework, improving consistency and maintainability. Documents search, mobile search layouts, and dashboard filtering were updated so users get a more consistent search and filtering experience across devices.
Original PR description
In https://github.com/odoo/odoo/pull/49899, the old SearchPanel widget has been converted to an OWL component and the class Model (module addons/web/static/src/js/model.js) has been refactored to…
In https://github.com/odoo/odoo/pull/49899, the old SearchPanel widget has been converted to an OWL component and the class Model (module addons/web/static/src/js/model.js) has been refactored to support multiple extensions. In the present PR, we bring several corresponding changes in enterprise, mainly: - in documents: the extension of the search panel had to be adapted. The logic regarding the rendering and the interactions has been given to a newly created DocumentsSearchPanel component while the data logic has been transferred to a new model extension, the DocumentsSearchPanelExtension. - in web_dashboard: a small model extension has been created for the dashboard view in order to handle the clicks on aggregates having a domain attribute. That model extension manages the domain to add to the global query and the additional facet to display in the search bar when such an aggregate is clicked on. It was done previously in the control panel model in a rather unsatisfactorily way. - for the mobile mode: the mobile version of the search panel has been adapted and the search view layouts used by both the search panel and control panel have been merged to increase consistency and maintainability. This includes a few DOM modifications in the control panel mobile XML and SCSS files as well as a major refactor of the mobile search panel layout. Task ID: 2228968
Resolved issues and error corrections
Odoo now avoids repeating an internal setup step for finding add-ons during normal startup and module lookups. This reduces unnecessary work while preserving the needed setup for early command discovery, helping keep startup behavior reliable.
Original PR description
The `initialize_sys_path` is the function responsible of getting the custom Odoo import hooks to work, i.e. addons import via `import odoo.addons`. This function is called by some other module related functions to ensure the paths are correctly setup. We are confident it is useless to re-initialize the path in many places. The `load_openerp_module` function is called during server bootup by both `odoo-bin server` and `odoo-bin shell`, both command parse the configuration before starting the server which initialize the paths already. Most call to `get_module`, `get_module_path` and `get_resource_path` are done in models or controllers where a registry is setup already. There is one notable exception which is the subcommand discovery done during the bootup, for that specific case, we initialize the paths with a partially loaded configuration. Task: 2200956
Miscellaneous changes
RATIONALE Even will soon gain a major update called Event Online, allowing to better support full-online events. In order to prepare its merge, preparatory merge are done to lessen the final diff. PURPOSE Prepare Event Online support by providing fixes and preparatory cleaning commits. SPECIFICATIONS Prepare some cleaning in sales_team / event common test files in order to ease new tests writing. Provide fixes for event after some testing in 13.3 Update demo data, notabl
Original PR description
RATIONALE Even will soon gain a major update called Event Online, allowing to better support full-online events. In order to prepare its merge, preparatory merge are done to lessen the final diff. PURPOSE Prepare Event Online support by providing fixes and preparatory cleaning commits. SPECIFICATIONS Prepare some cleaning in sales_team / event common test files in order to ease new tests writing. Provide fixes for event after some testing in 13.3 Update demo data, notably to prepare future Event Online support. See sub commits for more details. LINKS Task ID 2289148 (Event Bugprovements) Prepares Task ID 2283796 (Event B2Basics) Prepares Task ID 2252655 (master Online Event task) Forward-Port-Of: odoo/odoo#53956 Forward-Port-Of: odoo/odoo#53944
Grouped list headers now display without shadow effects that caused thin white gaps near borders. The header background is also slightly softened, improving visual consistency and readability in list views.
Original PR description
This PR removes the box-shadows on group header in list view. These box-shadows caused a visual glitch, there was a white line of 2-3px between the text and vertical borders. This PR also adds a slight transparency on group header's background. Task 2301397 COM PR: https://github.com/odoo/odoo/pull/54736
This corrects a small mistake in the multicurrency revaluation wizard so default values are requested using the proper input. It helps ensure the accounting report workflow initializes correctly and avoids unexpected behavior from the previous typo.
Original PR description
Wrong usage of fields instead of default_fields arg in default_get override. Finetuning of https://github.com/odoo/enterprise/commit/a8c2bceb178d2d2f0b365cd126744459dbd1626c
Various improvements and fixes are done: * Before, if we had PREFIX/9 and PREFIX/10, the highest number was the lexicographic order, leading to proposing PREFIX/10 again and again. Because of performances, we can't execute the regex in the SELECT query and we need to store it in the database. This will allow to do an indexed search. See https://github.com/odoo/odoo/pull/52986 and https://github.com/odoo/odoo/pull/52790 * The regex can now take more kinds of patterns. Before, we had to have
Original PR description
Various improvements and fixes are done: * Before, if we had PREFIX/9 and PREFIX/10, the highest number was the lexicographic order, leading to proposing PREFIX/10 again and again. Because of…
Various improvements and fixes are done: * Before, if we had PREFIX/9 and PREFIX/10, the highest number was the lexicographic order, leading to proposing PREFIX/10 again and again. Because of performances, we can't execute the regex in the SELECT query and we need to store it in the database. This will allow to do an indexed search. See https://github.com/odoo/odoo/pull/52986 and https://github.com/odoo/odoo/pull/52790 * The regex can now take more kinds of patterns. Before, we had to have the grouping keys in a certain order, with required groups for each reset mode. This is not longer the case. It allows having a suffix in multiple parts for instance, and to have the year/month in it. * We can handle the year with 2 digits now. It needs a separator between the year and the month if we are in a monthly pattern. * The prefix used is no longer the highest with a lexical order, but the last used in the relevant range (journal/date) -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#54408 Forward-Port-Of: odoo/odoo#53393
Make the error message more comprehensible for users, using the record's display name, the company's name, the field's label and value. Incompatible companies on records: - 'Foo' belongs to company 'X' and 'Contact' (partner_id: 'Bar') belongs to another company. Forward-Port-Of: odoo/odoo#44859
Original PR description
Make the error message more comprehensible for users, using the record's
display name, the company's name, the field's label and value.
Incompatible companies on records:
- 'Foo' belongs to company 'X' and 'Contact' (partner_id: 'Bar')
belongs to another company.
Forward-Port-Of: odoo/odoo#44859QR-BILL report has no margin so we can position things exactly where they needs to be according to standard. For example the form must stick at the bottom and have 100% width, so we can't use paperformat margin that would not allow to have 100% width. With this change, we set default padding on header so it match better "European A4" paperformat (that has 5mm top margin and 7mm right and left margin) for stylistic purpose. This is currently not configurable so for custom header size still nee
Original PR description
QR-BILL report has no margin so we can position things exactly where they needs to be according to standard. For example the form must stick at the bottom and have 100% width, so we can't use paperformat margin that would not allow to have 100% width. With this change, we set default padding on header so it match better "European A4" paperformat (that has 5mm top margin and 7mm right and left margin) for stylistic purpose. This is currently not configurable so for custom header size still need view editing to change current values, but this at least make the edition easy. opw-2267041 Forward-Port-Of: odoo/odoo#54719 Forward-Port-Of: odoo/odoo#54717
- Create a partner, set a VAT number - Create an invoice - Download the E-Faktur The NPWP (VAT number) remains zero. opw-2296971 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#54885
Original PR description
- Create a partner, set a VAT number - Create an invoice - Download the E-Faktur The NPWP (VAT number) remains zero. opw-2296971 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#54885
When a user with access to company A tried to make a purchase on the website of company B, he would face a traceback upon calling `_get_pricelist_available`. This happens because we eventually try to access to the current company (B) while forcing environment of the user (in company A), thus forfeiting the superuser privileges, which triggers an access error. opw-[2303488](https://www.odoo.com/web?debug=1#id=2303488&model=project.task&view_type=form&menu_id=5200) Forward-Port-Of: odoo
Original PR description
When a user with access to company A tried to make a purchase on the website of company B, he would face a traceback upon calling `_get_pricelist_available`. This happens because we eventually try to access to the current company (B) while forcing environment of the user (in company A), thus forfeiting the superuser privileges, which triggers an access error. opw-[2303488](https://www.odoo.com/web?debug=1#id=2303488&model=project.task&view_type=form&menu_id=5200) Forward-Port-Of: odoo/odoo#54809
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#54890
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#54890
This button has now a "btn-secondary" class. **Task ID:** #2288963 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#54207
Original PR description
This button has now a "btn-secondary" class. **Task ID:** #2288963 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#54207
The tour system is made such that we always have at most one tip displayed on every screen. Since commit [1], "inactive tips" (i.e. tips that aren't displayed because there's already an higher priority tip displayed), are rendered, but turned invisible (s.t. their action is still consumed when their anchor is clicked on), whereas before [1], those inactive tips weren't rendered. As a consequence, in the enterprise Home Menu with **a lot** of apps installed (e.g. on runbot), it lags when
Original PR description
The tour system is made such that we always have at most one tip displayed on every screen. Since commit [1], "inactive tips" (i.e. tips that aren't displayed because there's already an higher…
The tour system is made such that we always have at most one tip displayed on every screen. Since commit [1], "inactive tips" (i.e. tips that aren't displayed because there's already an higher priority tip displayed), are rendered, but turned invisible (s.t. their action is still consumed when their anchor is clicked on), whereas before [1], those inactive tips weren't rendered. As a consequence, in the enterprise Home Menu with **a lot** of apps installed (e.g. on runbot), it lags when the user scrolls, because all those invisible tips still do a lot of computation to reposition themselves. This commit skips these positionning computation for invisible tips. [1] 3bf1d8418f41bcaa0ba4b153620def11aaea0a2b Issue spotted while testing task 2263600 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#54911
Forward-Port-Of: odoo/enterprise#12004
Original PR description
Forward-Port-Of: odoo/enterprise#12004
Understanding how a pivot is build is not particularly easy. One reason being the funky cache structure. This commit hides the cache data stucture complexity inside a new object with a nice public API with proper names and documentation. Co-authored-by: fleodoo <fle@odoo.com> Forward-Port-Of: odoo/enterprise#11931
Original PR description
Understanding how a pivot is build is not particularly easy. One reason being the funky cache structure. This commit hides the cache data stucture complexity inside a new object with a nice public API with proper names and documentation. Co-authored-by: fleodoo <fle@odoo.com> Forward-Port-Of: odoo/enterprise#11931