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.

29 lines
956 B

  1. # -*- coding: utf-8 -*-
  2. # © 2016 Therp BV <http://therp.nl>
  3. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  4. from odoo import api, models
  5. class ReportFinancial(models.AbstractModel):
  6. _inherit = 'report.account.report_financial'
  7. def get_account_lines(self, data, side=None):
  8. return super(
  9. ReportFinancial, self.with_context(
  10. account_financial_report_horizontal_side=side,
  11. )
  12. ).get_account_lines(data)
  13. def get_left_lines(self, data):
  14. return self.get_account_lines(data, side='left')
  15. def get_right_lines(self, data):
  16. return self.get_account_lines(data, side='right')
  17. @api.multi
  18. def render_html(self, docids, data):
  19. data.setdefault('form', {}).update(
  20. get_left_lines=self.get_left_lines,
  21. get_right_lines=self.get_right_lines,
  22. )
  23. return super(ReportFinancial, self).render_html(docids, data)