openerp-community team mailing list archive
-
openerp-community team
-
Mailing list archive
-
Message #00573
Re: Debug RML
Thanks, i have not tested your solution but i have been able to fix the
problem putting the condition inside another line where the
removeParentNode was set up, like the following:
<section>
<para style="terp_default_2">[[ repeatIn(o.tax_line,'t') ]]</para>
<blockTable colWidths="180.0,90.0,90.0,180.0" style="Table2">
<tr>
<td>
<para style="terp_default_7">[[ t.name ]]</para>
</td>
<td>
<para style="terp_mono_Right_7">[[ o.currency_id.symbol ]] [[
format_with_commas('%.2f', t.base) ]] </para>
</td>
<td>
<para style="terp_mono_Right_7">[[ (t.tax_code_id and
t.tax_code_id.notprintable or t.tax_amount>0) and
removeParentNode('blockTable') or '' ]] [[ o.currency_id.symbol ]] [[
format_with_commas('%.2f', t.amount) ]]</para>
</td>
<td>
<para style="terp_default_7">
<font color="white"> </font>
</para>
</td>
</tr>
</blockTable>
</section>
p.d. format_with_commas is a custom function i created while i find the
built in way to print numbers like this on reports: '1,000,000.00'
Slds.
On 09/26/2011 11:58 PM, Dinil UD wrote:
<tr><td>[[ t.tax_amount>0 and t.tax_amount or
removeParentNode('tr') ]]</td></tr>
try this, hope this will work for you
On Mon, Sep 26, 2011 at 9:58 PM, Nestor Diaz
<nestor.at.tiendalinux@xxxxxxxxx
<mailto:nestor.at.tiendalinux@xxxxxxxxx>> wrote:
Hi OpenERP People.
* Firt message to the list * :)
I am working with openerp rml to make a custom invoice, but it
have been very painful, is there any way to create a temporaly
file in order to check the output of the rml parser ??
If i make a mistake on a rml file with removeParentNode function
then the openerp-server takes forever and after about 10 minutes
it shows:
INFORMATION
Printing aborted, too long delay
OK
So, i have to restart the server, fix the code and try to print
out again.
I am doing a simple comparison, like this for example (in order to
print just the negative taxes values) :
<tr><td>[[ t.tax_amount<0 and removeParentNode('tr') ]]
[[t.tax_amount]]</td></tr>
and it still doesn't work, i have tested with '<' also but nothing
happens, openerp just freeze for about 10 minutes.
I need some instruction in order to debug the rml output or
directions on how to use the removeParentNode funcion properly.
I use OpenERP 6.0.2 under Debian GNU/Linux Squeeze.
Slds.
--
Nestor A. Diaz
_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
<https://launchpad.net/%7Eopenerp-community>
Post to : openerp-community@xxxxxxxxxxxxxxxxxxx
<mailto:openerp-community@xxxxxxxxxxxxxxxxxxx>
Unsubscribe : https://launchpad.net/~openerp-community
<https://launchpad.net/%7Eopenerp-community>
More help : https://help.launchpad.net/ListHelp
--
Thanks & regards,
Dinil
References