2016-03-21 15 views
1

カスタムモジュールでレポート定義を変更しようとしましたが、成功しません。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')" 
    /> 

と私はattachment_useプロパティを削除したいし、私は

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

を設定する代わりに、レポートを置き換えるのではなく、新しいものを作成します。 この値を変更する方法はありますか?

おかげ

答えて

0

はい、ちょうどIDにアカウント接頭辞を追加します。以下のように。これは実際にレポートが存在するモジュールの名前です。これにより、新しいレポートが作成されず、既存のレポートに変更が加えられることはありません。

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

無効です。文字列を変更すると何も変わらない:( – billyJoe

+0

上記の変更を加えた後にモジュールをアップグレードしましたか? –

関連する問題