mirror of
https://gitlab.com/flectra-community/reporting-engine.git
synced 2024-07-06 18:40:29 +00:00
19 lines
577 B
Python
19 lines
577 B
Python
# Copyright 2017 Creu Blanca
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
|
|
|
from flectra import models
|
|
|
|
|
|
class PartnerXlsx(models.AbstractModel):
|
|
_name = "report.report_xlsx.partner_xlsx"
|
|
_inherit = "report.report_xlsx.abstract"
|
|
_description = "Partner XLSX Report"
|
|
|
|
def generate_xlsx_report(self, workbook, data, partners):
|
|
sheet = workbook.add_worksheet("Report")
|
|
i = 0
|
|
for obj in partners:
|
|
bold = workbook.add_format({"bold": True})
|
|
sheet.write(i, 0, obj.name, bold)
|
|
i += 1
|