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 can do it manually:
Settings / Technical / Reports / Paper Format / MySpecialFormat => Associated reports = Invoices
But from my module, what is the code ?
Solved below. Can be closed !
Sorry, I have few virtual karma
You can create a custom paperformat like this in your report.xml
<record id="my_custom_format" model="report.paperformat">
<field name="name">Item Label</field>
<field name="default" eval="True"/>
<field name="header_line" eval="False"/>
then link it with your report
<record id="id_of_your_report" model="ir.actions.report.xml">
<field name="paperformat_id" ref="YourModule.my_custom_format" />
Thanks zbik for your reply but sorry, I don't get it
Here is my xml paper format content:
I tried to do it in the xml instead the code (your links) but without success neither. In fact I don't know what to replace in your code example.
By setting string="Invoices" (as above in xml) is doesn't work
When I check In Settings/Technical/Reports/Paper Format/ MyModule => Displays "Invoices" but not working when I print one invoice
Thanks to all.
What I was looking for was : <record id="account.account_invoices"
Done in xml (instead python code) because much simpler.
=> When I check In Settings/Technical/Reports/Paper Format/ MyModule => Displays "Invoices" and works when I print one invoice.
May be I was not clear enough in the description. Sorry for that.
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: 6/5/15, 3:26 PM|
|Seen: 846 times|
|Last updated: 6/18/15, 3:09 AM|