Merge pull request #6 from akretion/8.0-mis_builder-small-enhancements
8.0 small enhancements on mis_builderpull/86/head
commit
f6b3f21b85
|
@ -292,7 +292,7 @@ class AccountingExpressionProcessor(object):
|
|||
if opening_period and \
|
||||
self._period_has_moves(opening_period[0]):
|
||||
# found opening period with moves
|
||||
if opening_period.date_start == period_from.date_start and \
|
||||
if opening_period.date_start == period_from.date_start and\
|
||||
mode == MODE_INITIAL:
|
||||
# if the opening period has the same start date as
|
||||
# period_from, then we'll find the initial balance
|
||||
|
|
|
@ -447,7 +447,9 @@ class MisReportInstancePeriod(models.Model):
|
|||
res = {}
|
||||
for query in self.report_instance_id.report_id.query_ids:
|
||||
model = self.env[query.model_id.model]
|
||||
domain = query.domain and safe_eval(query.domain) or []
|
||||
domain = query.domain and safe_eval(
|
||||
query.domain,
|
||||
{'uid': self._uid, 'context': self._context}) or []
|
||||
if query.date_field.ttype == 'date':
|
||||
domain.extend([(query.date_field.name, '>=', self.date_from),
|
||||
(query.date_field.name, '<=', self.date_to)])
|
||||
|
|
Loading…
Reference in New Issue