Thu, 1 Oct 2015 12:58:10 +0200 Cédric Krier <[email protected]>: >On 2015-10-01 12:34, 'Udo Spallek' via tryton wrote: >> Thu, 1 Oct 2015 10:11:27 +0200 >> Cédric Krier <[email protected]>: >> >On 2015-10-01 00:28, 'Udo Spallek' via tryton wrote: >> >> 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. >> Thank you, but I have no idea how to insert those directives in >> libreoffice. I tried placeholder type "text" with: >> >> <content test="sale.quotation_appendix"> >> </content> >> <content:sale.quotation_appendix> >> >> But it always produces errors: >> >> http://pastebin.com/4QfTXspt >> >> Maybe placeholder is not the correct way? >Yes it should. The content directive is like any other directive, you >have to put something like in the placeholder: > > content: p=sale.quotation_appendix > >where "p" is the name of the parent tag for which you want to set the >content. >There is an example in relatorio/examples/columns.odt
Yes, you where correct, it works with placeholder type text::
<content text:p="item.text">
Using this rich text content from Tryton 3.4::
<p align='center'><span font_family='Monospace'
size='27'>My Rich Text</span></p>
... with this odt (extract from content.xml, used
aa and bb as marker around)::
<text:p text:style-name="P25">aa</text:p>
<text:p text:style-name="P23">
<text:placeholder text:placeholder-type="text"><content
text:p="item.text"></text:placeholder> </text:p>
<text:p text:style-name="P28">bb</text:p>
... I get this result::
<text:p text:style-name="P25">aa</text:p>
<text:p text:style-name="P23">
<p align='center'><span font_family='Monospace'
size='27'>My Rich Text</span></p> </text:p>
<text:p text:style-name="P28">bb</text:p>
I think to solve this, it is needed to write a xslt converter for
relatorio, to convert the tryton-richtext-widget-language to open
document format.
Regards Udo
pgpW3Yni71BbZ.pgp
Description: Digitale Signatur von OpenPGP
