Skip to content
Snippets Groups Projects
Commit fe0f71aa authored by Jinjiu Liu's avatar Jinjiu Liu
Browse files

[FIX] *: missing date filter for stat button

Reproduction:
1. Install Sale, Inventory
2. Go to Sale->products, search for “Customizable Desk”
3. Hover the cursor on the stat button “Sold”, from its definition, the
analysis should show the sold items in last 365 days
4. Click on the “Sold” button, no filter for “Order Date”

Reason: in V14, the “time_ranges” feature is removed. Thus using it in
the context won’t create any filter for searching

Fix: We use a custom filter to replace the time range "last_365_days".
We also make sure that the domain produced by that filter is the same as
the one used to compute the button count server side (this was not the
case in Odoo 13 when "last_365_days" was used). Similar fix is also done
in mrp and l10n_ar. Mind the utc convert for correct results.

opw-3000595

Related commits:
Removal of time_ranges: https://github.com/odoo-dev/odoo/commit/be5a51a345b8986da0e19627260f64f984e11ae9
Date filter fix: https://github.com/odoo/enterprise/pull/10938



closes odoo/odoo#108914

X-original-commit: 03057029
Signed-off-by: default avatarMathieu Duckerts-Antoine <dam@odoo.com>
Signed-off-by: default avatarLiu Jinjiu (jili) <jili@odoo.com>
parent 79852338
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment