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
546 B

  1. # Copyright 2020 Camptocamp SA
  2. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  3. from odoo import api, models
  4. class IrActionsReport(models.Model):
  5. _inherit = "ir.actions.report"
  6. @api.model
  7. def _get_rendering_context(self, docids, data):
  8. """ Set context key to split partner address on two line only on report
  9. """
  10. res = super()._get_rendering_context(docids, data)
  11. docs = res.get("docs")
  12. res["docs"] = docs.with_context(_two_lines_partner_address=True)
  13. return res