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.

0

Report don't update according my new variable?

By
Luís Reigoto
on 10/3/13, 10:51 AM 728 views

Hi,

I want to change report of invoices (account_print_invoice sxw e rml) according to my new variable. In other words, I create my new variable:

'type_printed': fields.char('Printed', size=25)

My alteration on report account_print_invoice.sxw:

Print once [[ ((o.type_printed == 'print_once' and (o.state == 'open' or o.state == 'paid')) or removeParentNode('para')) and '' ]]

Print Twice [[ ((o. type_printed == 'print_twice' and (o.state == 'open' or o.state == 'paid')) or removeParentNode('para')) and '' ]]

When I print the invoice (account_print_invoice) the report file only prints the first alteration (Print once in type_printed == 'print_once'). Even if the field change to "print_twice" my report print always the first alteration (Print once in type_printed == 'print_once').

In account_report.xml I change the tag auto and attachment_use to all combinations but the bug continues:

<report
        auto="False"
        id="account_invoices"
        model="account.invoice"
        name="account.invoice"
        rml="account/report/account_print_invoice.rml"
        string="Invoices"
        attachment="(object.state in ('open','paid')) and ('INV'+(object.number or '').replace('/','')+'.pdf')"
        attachment_use="False"
        usage="default"
      />

I think that is possible but I don't know how.

Anyone helps me??

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

0 follower(s)

Stats

Asked: 10/3/13, 10:51 AM
Seen: 728 times
Last updated: 3/16/15, 8:10 AM