mirror of
https://gitlab.com/flectra-community/mis-builder.git
synced 2024-11-17 03:32:03 +00:00
[FIX] Update from old repo
This commit is contained in:
parent
3acfe9edaf
commit
25d4c3bdd2
@ -611,24 +611,25 @@ class MisReport(models.Model):
|
|||||||
domain = query.domain and safe_eval(query.domain, eval_context) or []
|
domain = query.domain and safe_eval(query.domain, eval_context) or []
|
||||||
if get_additional_query_filter:
|
if get_additional_query_filter:
|
||||||
domain.extend(get_additional_query_filter(query))
|
domain.extend(get_additional_query_filter(query))
|
||||||
if query.date_field.ttype == "date":
|
if query.date_field.ttype:
|
||||||
domain.extend(
|
if query.date_field.ttype == "date":
|
||||||
[
|
domain.extend(
|
||||||
(query.date_field.name, ">=", date_from),
|
[
|
||||||
(query.date_field.name, "<=", date_to),
|
(query.date_field.name, ">=", date_from),
|
||||||
]
|
(query.date_field.name, "<=", date_to),
|
||||||
)
|
]
|
||||||
else:
|
)
|
||||||
datetime_from = _utc_midnight(date_from, self._context.get("tz", "UTC"))
|
else:
|
||||||
datetime_to = _utc_midnight(
|
datetime_from = _utc_midnight(date_from, self._context.get("tz", "UTC"))
|
||||||
date_to, self._context.get("tz", "UTC"), add_day=1
|
datetime_to = _utc_midnight(
|
||||||
)
|
date_to, self._context.get("tz", "UTC"), add_day=1
|
||||||
domain.extend(
|
)
|
||||||
[
|
domain.extend(
|
||||||
(query.date_field.name, ">=", datetime_from),
|
[
|
||||||
(query.date_field.name, "<", datetime_to),
|
(query.date_field.name, ">=", datetime_from),
|
||||||
]
|
(query.date_field.name, "<", datetime_to),
|
||||||
)
|
]
|
||||||
|
)
|
||||||
field_names = [f.name for f in query.field_ids]
|
field_names = [f.name for f in query.field_ids]
|
||||||
all_stored = all([model._fields[f].store for f in field_names])
|
all_stored = all([model._fields[f].store for f in field_names])
|
||||||
if not query.aggregate:
|
if not query.aggregate:
|
||||||
|
Loading…
Reference in New Issue
Block a user