This question has been flagged
1 Reply
3797 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??

Avatar
Discard
Best Answer

I think I had a similar problem. For some reason my OpenErp no longer wanted to re-read the .rml files.

(my original question here: https%3A%2F%2Fwww.odoo.com%2Ffr_FR%2Fforum%2Faide-1%2Fquestion%2Fchanges-to-rml-files-won-t-show-up-on-reports-130549)

Maybe this other answer would help in such a situation. To sum up, it suggests :

1) update the field of your specific report in the database (i.e. `account.invoice`)

2) run a module update

https://www.odoo.com/fr_FR/forum/aide-1/question/can-t-update-report-pdf-sale-quotation-73263

Avatar
Discard