首页 > 解决方案 > 如何在odoo 12中生成报告(xlsx格式)和Qweb报告

问题描述

我正在使用帐户财务报告模块 (OCA)。我想根据代码添加树结构:如果account.code =“xxx000”或“yyy000”,然后将线条样式更改为粗体,并按升序获取其他代码。例子:

Code     |             |
-------------------------
 xxx000  |             |
-------------------------
         |xxx001       |
-------------------------
         |xxx003       |
-------------------------
yyy000   |             |
-------------------------
         |yyy002       |
-------------------------
         |yyy005       |
-------------------------

   def _generate_report_content(self, workbook, report):
        if not report.show_partner_details:
            # Display array header for account lines
            self.write_array_header()

    # For each account
    for account in report.account_ids.filtered(lambda a: not a.hide_line):
        if not report.show_partner_details:
            # Display account lines
            self.write_line(account, 'account')

请问有什么帮助吗?

标签: pythonodoo-12

解决方案


推荐阅读