Odoo Help

1

rml report: how can set black line between table row's in rml?

By
nasim
on 5/19/16, 2:02 AM 569 views

hi

I defin a function in my .py file that return many rows in rml report.

my .py code is:

----------------------

 

def _getsalesdetail(self, fromDate, toDate):

sql = "select so.name,so.date_order,section.name,resu.name,resp.name,soline.id \

,lag(null,1,pp.name_template) over (partition by pp.name_template order by soline.price_unit) as product \

,soline.name,soline.price_unit,soline.product_uom_qty ,actax.amount ,soline.discount \

,((soline.price_unit - soline.price_unit*(soline.discount/100))*(1+actax.amount)) \

,soline.product_uom_qty*((soline.price_unit - soline.price_unit*(soline.discount/100))*(1+actax.amount)) \

from sale_order_line as soline \

full outer join sale_order_tax as soltax on soltax.order_line_id=soline.id \

full outer join account_tax as actax on actax.id=soltax.tax_id \

full outer join sale_order as so on so.id=soline.order_id \

full outer join product_product as pp on pp.id=soline.product_id \

full outer join res_partner as resp on resp.id=so.partner_id \

full outer join res_users as resu on resu.id=so.user_id \

full outer join crm_case_section as section on section.id=so.section_id \

where soline.type='make_to_order' and so.state !='draft' AND so.date_order BETWEEN \'%s\' AND \'%s\' \

group by pp.id,pp.name_template, so.name,so.date_order,section.name,resu.name,resp.name,soline.id,actax.amount" %(fromDate, toDate)

self.cr.execute(sql)

return self.cr.fetchall() or ['-']

----------------------------------------------

and my rml code is:

<blockTable colWidths="38.0,38.0,28.0,38.0,40.0,37.0,37.0,55.0,20.0,23.0,23.0,62.0,60.0" style="Table5">

<tr>

<td>

<para style="P9">[[ repeatIn(getsalesdetail(data['form']['fromDate'], data['form']['toDate']),'ho') ]]</para>

<para style="P8">[[ho[0] ]]</para>

</td>

<td>

<para style="P8">[[toJalali(ho[1]) ]]</para>

</td>

<td>

<para style="P8">[[ho[2] ]]</para>

</td>

<td>

<para style="P10">[[ho[3] ]]</para>

</td>

<td>

<para style="P8">[[ho[4] ]]</para>

</td>

<td>

<para style="P8">[[ho[6] ]]</para>

</td>

<td>

<para style="P8">[[ho[7] ]]</para>

</td>

<td>

<para style="P8">[[ formatLang(ho[8],currency_obj=company.currency_id) ]]</para>

</td>

<td>

<para style="P8">[[ho[9] ]]</para>

</td>

<td>

<para style="P8">[[ho[10] ]]</para>

</td>

<td>

<para style="P8">[[ho[11] ]]</para>

</td>

<td>

<para style="P8">[[ formatLang(ho[12],currency_obj=company.currency_id) ]]</para>

</td>

<td>

<para style="P8">[[ formatLang(ho[13],currency_obj=company.currency_id) ]]</para>

</td>

</tr>

</blockTable>

--------------------------------------------

but when I print report

I want between lines(row) add a black line. I don't know how can do it?

my openoffice version is : Libre Office3

Thank you

yes, The problem was solved.

nasim
on 5/21/16, 1:57 AM
2

Hi,

I guess that you want to line below each row of the record or table. For that you have to make your style="Table5" is as like below.

<blockTableStyle id="Table5">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="5,-1" stop="5,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="6,-1" stop="6,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="7,-1" stop="7,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="8,-1" stop="8,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="9,-1" stop="9,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="10,-1" stop="10,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="11,-1" stop="11,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="12,-1" stop="12,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="13,-1" stop="13,-1"/>
</blockTableStyle>

As like "LINEBELOW" there is other options like : "LINEABOVE", "LINEAFTER", "LINEBEFORE" to manage line of individual shell <td> of table.

I hope it is useful to you.

 


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

Question tools

1 follower(s)

Stats

Asked: 5/19/16, 2:02 AM
Seen: 569 times
Last updated: 5/21/16, 3:32 AM