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.
Is there anyway to place an image inside the body (<story>) of a rml report? I know how to add it in <pageGraphics> but <image file="http://localhost:..." /> doesn't seem to work...
Thanks in advice
If you haven't change the RML Header setting in the Company, you can find example there. The image tag can only accept images that are stored in database. Example in the standard RML Header is: <image x="1.3cm" y="27.7cm" height="40.0" >[[ company.logo or removeParentNode('image') ]]</image>, which takes the company's logo stored in the database. If you need images other than the Company's Logo, you can attach it to ir.attachment and use setHtmlImage. Here is the explanation of setHtmlImage: setHtmlImage(id, model=None, field=None, context=None), returns the value of field as specified by given database id in the given model. If model is not specified, it will return the value of field datas of ir.attachment. Or, alternatively you can use report_webkit's ir.header_img and make use of it's get_logo_by_name method to obtain the image by name.
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: 1/20/15, 7:11 AM|
|Seen: 1302 times|
|Last updated: 3/16/15, 8:10 AM|