mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[FIX] web_time_range_menu_custom: Mix custom and 'no custom' periods
Steps to reproduce: - Go to pivot view - Select a custom time range - Select a predefined comparison period (Ex. Previous Period) Now you see that the comparison period is not being applied. After this commit the comparison period is applied correctly. TT29249
This commit is contained in:
committed by
Carlos Roca
parent
9dc3acb296
commit
840ab92bb4
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
"name": "Web Time Range Menu Custom",
|
"name": "Web Time Range Menu Custom",
|
||||||
"version": "13.0.1.0.0",
|
"version": "13.0.1.0.1",
|
||||||
"author": "Tecnativa, Odoo Community Association (OCA)",
|
"author": "Tecnativa, Odoo Community Association (OCA)",
|
||||||
"license": "AGPL-3",
|
"license": "AGPL-3",
|
||||||
"website": "https://github.com/OCA/web",
|
"website": "https://github.com/OCA/web",
|
||||||
|
|||||||
@@ -52,6 +52,21 @@ odoo.define("web_time_range_menu_custom.ControlPanelModel", function(require) {
|
|||||||
context.timeRangeMenuData.timeRange
|
context.timeRangeMenuData.timeRange
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if (filter.comparisonTimeRangeId !== "custom_comparison_period") {
|
||||||
|
context.timeRangeMenuData.comparisonTimeRange = Domain.prototype.constructCustomDomain(
|
||||||
|
filter.fieldName,
|
||||||
|
filter.timeRangeId,
|
||||||
|
filter.fieldType,
|
||||||
|
filter.comparisonTimeRangeId,
|
||||||
|
filter.timeRangeCustom,
|
||||||
|
filter.comparisonTimeRangeCustom
|
||||||
|
);
|
||||||
|
if (evaluation) {
|
||||||
|
context.timeRangeMenuData.comparisonTimeRange = Domain.prototype.stringToArray(
|
||||||
|
context.timeRangeMenuData.comparisonTimeRange
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (filter.comparisonTimeRangeId === "custom_comparison_period") {
|
if (filter.comparisonTimeRangeId === "custom_comparison_period") {
|
||||||
context.timeRangeMenuData.comparisonTimeRange = Domain.prototype.constructCustomDomain(
|
context.timeRangeMenuData.comparisonTimeRange = Domain.prototype.constructCustomDomain(
|
||||||
|
|||||||
Reference in New Issue
Block a user