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.

28 lines
874 B

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