2017-08-08 86 views
1

在我的自定義模塊中我試圖將默認發票報告更改爲自定義報告。這是報告標籤將默認發票報告更改爲自定義報告?

 <report 
     id="account.account_invoices" 
     model="account.invoice" 
     string="Invoice custom report" 
     report_type="qweb-pdf" 
     name="custom_invoice_report.custom_invoice_template" 
     file="custom_invoice_report.custom_invoice_template" 
    /> 

我也在我的代碼中定義了<template id="custom_invoice_template">。 但打印了默認發票報告。如何更改此自定義報告?

我用id="account.account_invoices裝載發送郵件發送attachment.The郵件附件加載基於此ID。

回答

1

我們需要添加屬性attachment_use =「False」加載新的報告更改。在發票報表中有attachment_use =「True」表示一旦我們打印報表並且輸出結果會一樣。

嘗試用下面的代碼:

<report 
    id="account.account_invoices" 
    model="account.invoice" 
    string="Invoice custom report" 
    report_type="qweb-pdf" 
    attachment_use="False" 
    name="custom_invoice_report.custom_invoice_template" 
    file="custom_invoice_report.custom_invoice_template" 
/> 
+0

:謝謝你的相關信息 – aslamsha22