0

我正在使用 OpenERP 8 odoo,我正在关注报告创建教程,但我被困在我能做到的地方,但报告记录代码例如:

      <report
      id="account_invoices"
      model="account.invoice"
      string="Invoices"
      report_type="qweb-pdf"
      name="account.report_invoice"
      file="account.report_invoice"
      attachment_use="True"
      attachment="(object.state in ('open','paid')) and
      ('INV'+(object.number or '').replace('/','')+'.pdf')"
      />

提前致谢参考: http ://blog.emiprotechnologies.com/create-qweb-report-odoo/

4

1 回答 1

0

在 ODOO 中创建 Qweb 报告的通用目录文件结构

报告目录文件包含

__ 初始化 __.py 文件

它用作任何 python 模块的清单文件,它是 python 模块的入口点。(添加 your_report_parser_class_file.py 文件的入口点)

your_report_parser_class_file.py 文件

您的报告解析器类文件用于包含您希望将来在报告中调用的报告相关函数和变量(在 Qweb 视图中)

查看目录文件包含

report_your_report_name.xml 文件

用于添加报告视图文件,这意味着该文件将显示 Qweb 视图

(通常它使用引导类和我们的自定义 css 和 Qweb 模板引擎标签来设计 Qweb 报告,并且此文件已添加到 __openerp__.py 文件中)

report_menu_file.xml 文件

添加菜单 xml 文件以添加菜单以打印与 __ openerp__.py 文件完全接近并具有相同文件夹的 Qweb 报告

(这个文件也有在 __ openerp__.py 文件中添加条目)

于 2015-02-26T19:06:00.433 回答