コンテンツへスキップ
メニュー
この質問にフラグが付けられました
3 返信
9090 ビュー

I use attachment_use in xml report, but it doesn't work, can anyone help me? I want to define attachment_use as False.

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <report
            auto="False"
            id="account.account_invoices"
            model="account.invoice"
            name="aa.account_invoice"
            rml="aa/report/account_print_invoice.rml"
            string="Invoices"
            attachment="(object.state in ('open','paid')) and ('INV'+(object.number or '').replace('/','')+'.pdf')"
            attachment_use="0"
            usage="default"
            multi="True"
            header="True"/>
    </data>
</openerp>

And then, I upgrade my modul aa, but attachment_use is always True.

アバター
破棄

I got the same problem... any update about this?

最善の回答

Hi, Try  to rewrite your report.Works very well and successfully

<record id="account.account_invoices" model="ir.actions.report.xml">

<field name="attachment_use" eval="False"/>

</record>

アバター
破棄

This does work really well, I will make a proper answer, for others who should ask.

最善の回答

Hi,

make it like this: attachment_use="True"

Email : info@acespritech.com
Skype : acespritech
Blog : acespritechblog.wordpress.com

アバター
破棄
著作者

Thanks but sorry I didn't explain my question clearly. Now, attachment_use is True, but I want to define it as False. But it doesn't work.

最善の回答

Hi,

Like Juan Carlos Hernández Funes said, the <record id= form works really well. Here's my working code :

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <record id="account.account_invoices" model="ir.actions.report.xml">
            <field name="auto" eval="False"/>
            <field name="model">account.invoice</field>
            <field name="report_name">custom.account.invoice</field><!-- name is called report_name in this form -->
            <field name="name">Invoices</field><!-- string is called name -->
            <field name="report_rml">account_payment_method/report/account_print_invoice.rml</field><!-- same here rml -> eport_rml -->
            <field name="attachment">"(object.state in ('open','paid')) and ('INV'+(object.number or '').replace('/','')+'.pdf')"</field>
            <field name="attachment_use" eval="False"/>
            <field name="usage">default</field>
        </record>
    </data>
</openerp>

If someone could accept this, that would help later openerp developpers :)

アバター
破棄
関連投稿 返信 ビュー 活動
2
3月 15
9121
6
9月 21
16810
1
6月 16
3954
0
4月 15
3454
0
10月 24
1387