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? [Closed]

By
Luís
on 10/3/13, 10:54 AM 619 views

The Question has been closed for reason: duplicate question

by
Ray Carnes
on 10/09/2013 19:34:26

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??

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:54 AM
Seen: 619 times
Last updated: 3/16/15, 8:10 AM