You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
590 B

  1. # Copyright 2021 Tecnativa - Pedro M. Baeza
  2. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  3. from odoo import models
  4. class MisReportInstancePeriod(models.Model):
  5. _inherit = "mis.report.instance.period"
  6. def _get_additional_move_line_filter(self):
  7. """Add the posted condition ."""
  8. domain = super()._get_additional_move_line_filter()
  9. if (
  10. self._get_aml_model_name() == "mis.cash_flow"
  11. and self.report_instance_id.target_move == "posted"
  12. ):
  13. domain += [("state", "=", "posted")]
  14. return domain