Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

3

attachment_use doesn't work

By
Toutou
on 6/6/13, 6:16 AM 2,160 views

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?

Skillteam, Houssine BAKKALI
on 6/19/13, 3:23 PM
1

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.

PY
on 10/31/14, 5:00 AM
0
Dharmesh Rathod
On 6/6/13, 7:58 AM

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.

Toutou
on 6/6/13, 10:20 AM
0
PY
On 10/31/14, 5:05 AM

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 :)

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 6/6/13, 6:16 AM
Seen: 2160 times
Last updated: 8/5/16, 10:21 AM