diff --git a/mis_builder/models/aep.py b/mis_builder/models/aep.py index fc1622bf..b8d3664e 100644 --- a/mis_builder/models/aep.py +++ b/mis_builder/models/aep.py @@ -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 diff --git a/mis_builder/models/mis_builder.py b/mis_builder/models/mis_builder.py index 36c71839..62b0b0f8 100644 --- a/mis_builder/models/mis_builder.py +++ b/mis_builder/models/mis_builder.py @@ -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)])