Files
odoo_source/addons/project
abd-msyukyu-odoo 40dda26350 [FIX] core, web: handle read_group ranges for multiple granularities
There was an issue with the computed `read_group` `__range` when grouping on
the same date/datetime field on multiple granularities (i.e. month, week).
Since the range was stored with the field_name as a key, the last evaluated
range would override the previous ones.

Impacted Versions:

  - master
  (- exists since 15.0 but it does not impact the user directly so it has been
  decided to fix this only in master, since the API is modified)

Steps to reproduce:

  1. Open a list view and group by a date field with at least 2 granularities
  2. Open the chrome debugger (network) and check a web_read_group rpc preview
  3. Find the web_read_group for groups related to one of the largest
     granularities and check the `__range`

Current behavior:

  - `__range = {field_name: false}`

Expected behavior:

  - `__range = {field_name: {from: range_start, to: range_end}`

Explanation

Since the smaller granularities are evaluated last, and the condition to update
`__range` is related to the field_name and not the granularity, the range is
always overriden by the smaller granularities (even if their value is False)
when grouping on the same field with multiple granularities.

Furthermore, there is a conceptual problem with the current solution: it does
not allow to store multiple ranges when the read_group is not lazy and when
grouping on the same field with multiple granularities.

Therefore, the proposed solution is to use the full groupby keys in the
`__range` to allow storing multiple ranges depending on granularity. The keys
in `__range` would thus match the group value keys and allow more flexibility
if a domain must be forged from the group(s) range(s).

Task-2894519

closes odoo/odoo#95193

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-07-14 18:03:50 +02:00
..
…
2022-06-02 18:58:14 +02:00
…

Project Management

Infinitely flexible. Incredibly easy to use.

Odoo's collaborative and realtime open source project management helps your team get work done. Keep track of everything, from the big picture to the minute details, from the customer contract to the billing.

Designed to Fit Your Own Process

Organize projects around your own processes. Work on tasks and issues using the kanban view, schedule tasks using the gantt chart and control deadlines in the calendar view. Every project may have its own stages, allowing teams to optimize their job.

Easy to Use

Get organized as fast as you can think. The easy-to-use interface takes no time to learn, and every action is instantaneous, so there’s nothing standing between you and your sweet productive flow.

Work Together

Real-time chats, document sharing, email integration

Use the chatter to communicate with your team or customers and share comments and documents on tasks and issues. Integrate discussion fast with the email integration.

Talk to other users or customers with the website live chat feature.

Collaborative Writing

The power of etherpad, inside your tasks

Collaboratively edit the same specifications or meeting minutes right inside the application. The integrated etherpad feature allows several people to work on the same tasks, at the same time.

This is very efficient for scrum meetings, meeting minutes or complex specifications. Every user has their own color and you can replay the whole creation of the content.

Get Work Done

Get alerts on followed events to stay up to date with what interests you. Use instant green/red visual indicators to scan through what has been done and what requires your attention.

Timesheets, Contracts & Invoicing

Projects are automatically integrated with customer contracts, allowing you to invoice based on time & materials and record timesheets easily.

Track Issues

Single out the issues that arise in a project in order to have a better focus on resolving them. Integrate customer interaction on every issue and get accurate reports on your team's performance.