Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
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??
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
About This Community
This platform 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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 10/3/13, 10:51 AM|
|Seen: 1082 times|
|Last updated: 3/8/18, 3:35 AM|