예제 #1
0
 def test1(self):
     matrix = self.instance._compute_matrix()
     assert_matrix(matrix, [
         # jan, bud jan, feb (3w), bud feb (3w),
         [10, 10, 10, 15],  # k1
         [11, 11, 11, 16],  # k2 = k1 + 1
     ])
예제 #2
0
 def test_with_report_instance(self):
     instance = self.env["mis.report.instance"].create(
         dict(name="test instance",
              report_id=self.report.id,
              comparison_mode=True))
     self.pbud1 = self.env["mis.report.instance.period"].create(
         dict(
             name="pbud1",
             report_instance_id=instance.id,
             source=SRC_MIS_BUDGET_BY_ACCOUNT,
             source_mis_budget_by_account_id=self.budget.id,
             manual_date_from="2017-01-01",
             manual_date_to="2017-01-31",
         ))
     matrix = instance._compute_matrix()
     assert_matrix(matrix, [[24]])