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
17 lines
546 B
# Copyright 2020 Camptocamp SA
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
|
|
|
from odoo import api, models
|
|
|
|
|
|
class IrActionsReport(models.Model):
|
|
_inherit = "ir.actions.report"
|
|
|
|
@api.model
|
|
def _get_rendering_context(self, docids, data):
|
|
""" Set context key to split partner address on two line only on report
|
|
"""
|
|
res = super()._get_rendering_context(docids, data)
|
|
docs = res.get("docs")
|
|
res["docs"] = docs.with_context(_two_lines_partner_address=True)
|
|
return res
|