Wednesday, April 19, 2023
14 changes · master
Enhancements to existing features
This update refines how user avatar fields are handled and displayed in Odoo views. It should make user-related records easier to recognize visually while keeping the change limited to interface behavior.
Certification reports in the Survey app can now be customized more easily through Odoo Studio. The report structure was also simplified by separating report files and combining duplicate layouts, making future maintenance easier without changing the core user workflow.
Original PR description
The goal of this commit is to make certification reports editable by studio. We also move certification reports into separate report folder from views, and merge modern and classic views into one to avoid duplication. Task-3148819 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
This update makes project and timesheet screens clearer and easier to use by refining labels, preventing accidental opening of sales order links, and simplifying project user selection. It also improves task coloring in planning views so users can better understand tasks by project, stage, or template context.
Original PR description
** => project_timesheet_holidays, project The purpose of this PR is to improve the UX of the project and timesheet app So in this PR done following changes: - In the timesheet time off form view changes the label from timesheet to timesheets - In the timesheet list view added a 'no_open' option on the SOL field to make not be clickable - In project.project form view removed the 'quick' create option from the user_id field - In project.task form view added a 'no_open' option on the SOL field to make not be clickable - In project.task Gantt view made changes which change pill color as per following conditions requirements - the color of the worksheet template set on the task - else, the color set on the task - else, the color set on the project task-3125942
Campaign management is easier with archiving, quicker access to related views, and new filters for personal campaigns, archived campaigns, and tags. List and edit screens were refined with clearer labels, avatars, simpler stage editing, and helpful placeholders for link tracking setup.
Original PR description
Purpose
=======
Give users a better experience while using the utm campaign module.
Add placeholders to the link tracker module.
Specifications
==============
* Allow to archive a campaign and add the Archived filter.
* Change campaign kanban icons to buttons to ease the access to the
related views. It's not necessary to open the record anymore.
* Add a filter called "My Campaigns" filtering on the current user_id.
* Add a groupby Tags.
* In the list view:
- Change the column name from "Campaign Name" to "Name"
- Add bold on the stage field.
- Add the avatar widget to the Responsible field.
* For the edit stage modal:
- Make the dialog smaller.
- Only display the name field.
- Add a placeholder to the name field.
* Add placeholders to the Mediums and Sources tree views in the link_tracker module.
Task-3240966Fleet users now get two additional standard contract types, Omnium and Leasing, available by default. Vehicle model lookup is also easier because users can search by both manufacturer and model name, helping them find the right vehicle records faster.
Original PR description
This PR : - Adds 2 new default contract types to the data : Omnium and Leasing - Lets the user search models by manufacturer name and model name task - 3249291 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Field selection popovers are easier to navigate, with better keyboard support, smarter starting points, and clearer choices for related fields. This helps users build filters, domains, and dynamic placeholders more reliably with fewer invalid selections.
Original PR description
We refactor the ModelFieldSelector and ModelFieldSelectorPopover components. We also improve a bit ModelFieldSelectorPopover: - on first page, the button to go back is no longer available (so that it…
We refactor the ModelFieldSelector and ModelFieldSelectorPopover
components.
We also improve a bit ModelFieldSelectorPopover:
- on first page, the button to go back is no longer available
(so that it is now more difficult to produce an invalid path)
- we always start with a page presenting the model where the last
selected field name belongs to
- the keyboard navigation is improved
- click on model field selector opens the popover with the focus in
the search input (if any)
- for relational fields in popover: the user can either click on the
relational field (and select it) or a special button that make him
follow the relation to the field comodel
We also refactor the hook useDynamicPlaceholder to make it use a new
component DynamicPlaceholderPopover that uses ModelFieldSelectorPopover.
Task ID: 3272798
Related Enterprise PR: https://github.com/odoo/enterprise/pull/39673
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Michaël Mattiello <mcm@odoo.com>This update aligns several enterprise apps with a newer internal reporting and grouping method from the core platform. It should make grouped business data, reports, and dashboards more consistent and efficient, with little direct change for end users.
This update aligns spreadsheet filters and Studio field configuration with the redesigned field selector, making field selection more consistent and easier to use. It updates related panels, popovers, styling, and tests so users get a smoother experience when configuring spreadsheet filters or editing views in Studio.
Original PR description
The model field selector and its popover have been refactored/improved in https://github.com/odoo/odoo/pull/117951. Here we adapt the code of several modules to that changes. Task ID: 3272798 Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: Michaël Mattiello <mcm@odoo.com>
When users clone an Excel file into an Odoo spreadsheet, the original Excel file can now be archived to avoid keeping duplicate files. A confirmation step still lets users choose to keep both files when needed, reducing clutter while preserving flexibility.
Original PR description
Purpose: Fewer clicks for the user to avoid duplicate spreadsheet and xlsx while providing the opportunity to keep both files if desired. For simplicity, we use a confirmation dialog, but disable the two props we customize here. A test tour for this PR changes is included. Task-3209385
Article links clicked from outside the Knowledge app now open in a new browser tab. This lets users keep their current record open while searching or reading related documentation in Knowledge.
Original PR description
When clicking on an article link outside of Knowledge, it should open a new tab to start a new navigation, so that one can still edit/consult the record with the link and do a documentation search in Knowledge on the side. Attributes on the anchor for a Behavior are now "fixed" in a separate method: `setupAnchor`. They can be "wrong" for various reasons: - cleaned by sanitization (frontend, backend). Indeed, it is not necessary to add an exception during those sanitizations for attributes whose value depend on the state of the application - wrong attribute value from a previous Odoo version - wrong attribute from content pasted/dropped from an origin field in another state than the destination field (i.e. copy/paste from a 'readonly' field to an 'editable' field. Task-2852931
This update makes timesheet and helpdesk records easier to use by preventing accidental navigation from key linked fields. It also improves project planning views by applying clearer stage-based colors in Gantt and calendar views, helping users scan task status more quickly.
Original PR description
_* = helpdesk_timesheet, sale_timesheet_enterprise, timesheet_grid The purpose of this commit is to improve the UX of the project, timesheet and helpdesk app So in this commit done following changes: - -In the timesheet form view added a 'no_open' option on the project_id,helpdesk_ticket_id, and SOL field to make not be clickable - In the timesheet list view added a 'helpdesk_ticket_id' option on the SOL field to make not be clickable - In the helpdesk ticket form view added a 'no_open' option on the SOL field to make not be clickable - Gantt and calendar views in Project app - Project app: the color used should be according to the stage - My Tasks/ All tasks: the color used should be according to the project stage set on the task task-3125942
Resolved issues and error corrections
This fixes an issue in Point of Sale where removing an order line could cause the customer display to crash. The display update is now delayed slightly so it only refreshes once the order data is stable, improving reliability during checkout.
Original PR description
Steps to reproduce: - Activate customer display. - Open a pos session. - Open the customer display. - Add orderline. - Delete the orderline. Then there's traceback. This is caused by the fact that the `effect` used to update the customer display is synchronous, and when removing an order, `splice` is applied in multiple steps, and causes multiple notifications to the underlying reactive. At some of those steps, the reactive state is inconsistent (ie, one of the slots of the reactive array is empty) causing the call to map to result in an array with empty slots which cannot be used in `Object.fromEntries`. This commit fixes that my batching the updates to the customer display in the next microtask tick, meaning that the update will never be done with an inconsistent state.
Code cleanup and technical improvements
Original PR description
Change for the new _read_group done in the community repo Community: https://github.com/odoo/odoo/pull/110737
List view totals for monetary fields now avoid showing misleading aggregates when records use different currencies. When totals are valid, the relevant currency is displayed so users can interpret amounts correctly.
Original PR description
This commit fixes how monetary fields are handled when doing aggregates in list view: aggregates should not be computed when all values are not in the same currency and the currency should be displayed with the aggregate when this is not the case. Steps to reproduce: create a list view with a monetary field in studio, add an aggregate of the values of this field and check the behavior with and without a currency field present. opw-2822174
This update rebuilds how Odoo calculates grouped totals and summaries behind the scenes, making reports and dashboards easier for developers to optimize and maintain. It also aligns these calculations with standard security rules, improving consistency across areas such as accounting, CRM, calendar, and fleet.
Original PR description
## Rationale The method `read_group()` was designed to be used by the web client to efficiently compute aggregations grouped by one or more fields. However, more and more developers have been using…
## Rationale
The method `read_group()` was designed to be used by the web client to efficiently compute aggregations grouped by one or more fields. However, more and more developers have been using it from the backend to make computations more efficient (avoid doing the aggregation in Python). Unfortunately, the API was designed for the web client, which adds a lot of boilerplate when used in the Python (list of dict with misleading key names).
Method `_read_group()` was created to improve the performance of `read_group()` for backend use (4ef0c00b4b37d75b78c5cd30dba004ffd0f8b0ac), but didn't change the API and based the implementation on `read_group()` itself.
This rewrites `_read_group()` from scratch with a new API to make it easier to use from the backend. Also, split the method to make it easy to override and add custom behavior.
## New API of `_read_group()`
The purpose of the method is unchanged: get field aggregations specified by `aggregates` grouped by the given `groupby` fields where records are filtered by the `domain`.
### Parameters
- Rename `fields` into `aggregates`; parameter `aggregates` is a list of _explicit_ aggregate specifications (no implicit aggregator coming from `group_operator`).
- Parameter `groupby` becomes the second parameter (just before `aggregates`). It is much more readable for the returning value. Also the groupby specification for date/datetime fields should be always explicit (no default 'month').
- New parameter `having`, which is a domain-like list to filter the result depending of aggregate values. It allows to simplify some code and avoid to fetch unnecessary data from the database.
- Parameter `orderby` is renamed into `order`, to be consistent with method `search()`. Order terms should be an explicit aggregate specification or groupby specification (+ ASC/DESC).
- Remove parameter `lazy`, which was only used for the webclient and doesn't have any sense to be used in backend.
### Returned value
The returned value is a list of tuples containing, in order, the group values and aggregate values (flatten). For instance, if you group by `['foo', 'bar']` and aggregate `['baz:sum', 'quux:max']`, the result will contain tuples like `(foo_value, bar_value, baz_sum_value, quux_max_value)`.
If a group is relational field, its corresponding value will be a recordset (with a correct prefetch set that includes all returned values). For other fields, the returned values are similar to the ones you get from a record: no labels anymore, date/datetime values are not transformed strings, NULL values are returned as `False`, etc.
## Performance
Minor performance improvements:
- The aggregate `__count` generates `COUNT(*)` instead `COUNT(<table>.id)` (which generates useless null checks from PostgreSQL). Moreover, `COUNT(*)` is only added when we explicitly ask for `__count`.
- Remove the implicit `min(<table>.id)` aggregate added previously to the query at each read_group.
- The recordsets with correct prefetch set are returned for relational group values: it adds a very small cost of instantiation, but avoids manual browsing and bad field prefetching in business code.
- Don't include extra values generated for the webclient: `__domain`, `__range`, `__fold`, `__context`.
- A falsy domain simply doesn't make any query at all, just like `search`. It is very convenient with domains like `[(..., 'in', self.ids)]` where `self.ids` can be empty (it happens a lot in case of onchange methods).
Performance regression:
- The values of aggregation `array_agg` are now ordered by `id`, which is less efficient but it ensures a deterministic result.
### Performance Testing
Performance tests show that the new version/usage is faster in general.
With a populated database (`--size=medium` + some tweaks) and with all these changes,
the performance of the `_read_group`/`read_group` calls, for 2280 calls, is in average +- 9.17 % faster.
- 388 (on 2280) cases are statically slower (mean = -7.66 %, median = -5.17%) than before for several reasons:
- more restricted access due to the commit named "simplify security of read_group", which in some case generates extra queries.
- small overhead to instantiate recordsets;
- `array_agg` is now deterministic;
- noise.
- 862 cases are statically faster (mean = +181.08 %, median = +15.82%) than before.
## Next step
The second part of this task will be focused on the API of public method `read_group()`:
- Make it more consistent with this new `_read_group`.
- Simplify the parsing of data (always return raw values aside the labelled ones).
- Avoid useless aggregations.
Enterprise: https://github.com/odoo/enterprise/pull/38639