On 2015-10-01 00:28, 'Udo Spallek' via tryton wrote: > Hi, > > experimenting with the rich text widget for fields.Text() I can not > find a way to print the text in an odt report with Tryton and show > with libre office. > > In libre office in the odt I insert a placeholder field of type "text" > with the field name defined in Tryton. When I print the report, there > is only shown the HTML code, but not the rendered text, like:: > > <p align='center'><span font_family='Monospace' > size='27'>My Rich Text</span></p>
That's normal because simple python expression is considered as simple value templating directive. > Is there a way to get the rendered text shown in libre office? I did not test but the release 0.6.2 of relatorio include new directive like content and replace. Those directive should allow you to "insert" the HTML content in the odt. But be careful that in 3.4, the richtext widget doesn't always generate valid HTML as it is a mix of HTML and GTK markup. Also I don't know if ODT spec contains exactly the subset of HTML (from trunk) we use, maybe a converter should be used. -- Cédric Krier - B2CK SPRL Email/Jabber: [email protected] Tel: +32 472 54 46 59 Website: http://www.b2ck.com/
pgp2mXMGfP4fy.pgp
Description: PGP signature
