2016-07-15 59 views
0

我无法更改我的pdf报告的默认名称。如果我在设置中使用它,但我不想这样做。我试过在我的<report>中使用report_name,但它说report_name不是报表的元素。我无法弄清楚如何去做。Qweb报告report_name不起作用

回答

1

对于qweb报告的设置自定义名称,您可以设置报告的附件属性。

实例可如果发票:

<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')" 
    /> 

尝试使用模块:https://www.odoo.com/apps/modules/8.0/report_custom_filename/

希望这有助于。

+0

我已经试过这个解决方案,但我无法弄清楚如何使它工作。当我把附件,它不会改变我的PDF的名称。 – Zada1100

+0

尝试使用此模块:https://www.odoo.com/apps/modules/8.0/report_custom_filename/ –

+0

好的,我会尝试一下,谢谢! – Zada1100