[IMP]:account:improved for strip_name function and add rowHeight.

bzr revid: apa@tinyerp.com-20101123121511-31jkgmx1kpv22f78
This commit is contained in:
apa-tiny 2010-11-23 17:45:11 +05:30
parent c103fbc02b
commit e4b1403e44
4 changed files with 12 additions and 22 deletions

View File

@ -86,18 +86,9 @@ class general_ledger(report_sxw.rml_parse, common_report_header):
'get_start_date':self._get_start_date,
'get_end_date':self._get_end_date,
'get_target_move': self._get_target_move,
'strip_name': self._strip_name,
})
self.context = context
def _ellipsis(self, char, size=100, truncation_str='...'):
if len(char) <= size:
return char
return char[:size-len(truncation_str)] + truncation_str
def _strip_name(self, name, maxlen=50):
return self._ellipsis(name, maxlen)
def _sum_currency_amount_account(self, account):
self.cr.execute('SELECT sum(l.amount_currency) AS tot_currency \
FROM account_move_line l \

View File

@ -274,10 +274,10 @@
</blockTable>
<section>
<para>[[ repeatIn(get_children_accounts(a), 'o') ]]</para>
<blockTable colWidths="45.0,60.0,60.0,60.0,65.0,85.0,84.0,86.0" style="tbl_content">[[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]]
<blockTable rowHeights="0.55cm" colWidths="45.0,60.0,60.0,60.0,65.0,85.0,84.0,86.0" style="tbl_content">[[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]]
<tr>
<td>
<blockTable colWidths="245.0,40.0,84.0,86.0,84.0" style="Table5">
<blockTable rowHeights="0.55cm" colWidths="245.0,40.0,84.0,86.0,84.0" style="Table5">
<tr>
<td><para style="Standard"><font color="white">[[ '..'*(o.level-1) ]]</font>[[ o.code or '']] [[ o.name or '']]</para></td>
<td><para style="Standard"></para></td>
@ -323,10 +323,10 @@
</blockTable>
<section>
<para>[[ repeatIn(get_children_accounts(a), 'o') ]]</para>
<blockTable colWidths="45.0,45.0,55.0,60.0,60.0,62.5,62.5,77.5,77.5" style="tbl_content">[[ data['form']['amount_currency'] == True or removeParentNode('blockTable') ]]
<blockTable rowHeights="0.55cm" colWidths="45.0,45.0,55.0,60.0,60.0,62.5,62.5,77.5,77.5" style="tbl_content">[[ data['form']['amount_currency'] == True or removeParentNode('blockTable') ]]
<tr>
<td>
<blockTable colWidths="230.0,30.0,62.5,62.5,77.5,77.5" style="Table5">
<blockTable rowHeights="0.55cm" colWidths="230.0,30.0,62.5,62.5,77.5,77.5" style="Table5">
<tr>
<td><para style="Standard"><font color="white">[[ '..'*(o.level-1) ]]</font>[[ o.code or '' ]] [[ o.name or '' ]]</para></td>
<td><para style="Standard"></para></td>

View File

@ -373,7 +373,7 @@
<para style="terp_default_2">
<font color="white"> </font>
</para>
<blockTable colWidths="329.0,70.0,70.0,80.0" style="Table2">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
<blockTable rowHeights="0.55cm" colWidths="329.0,70.0,70.0,80.0" style="Table2">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
<tr>
<td>
@ -409,7 +409,7 @@
</para>
<section>
<para style="P1">[[ repeatIn(lines(p), 'line') ]]</para>
<blockTable colWidths="50.0,50.0,70.0,50.0,109.0,70.0,70.0,80.0" style="Table3">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
<blockTable rowHeights="0.55cm" colWidths="50.0,50.0,70.0,50.0,109.0,70.0,70.0,80.0" style="Table3">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
<tr>
<td>
<para style="P3">[[ formatLang(line['date'],date=True) ]]</para>
@ -478,7 +478,7 @@
<para style="terp_default_2">
<font color="white"> </font>
</para>
<blockTable colWidths="260.0,65.0,65.0,80.0,80.0" style="Table6">[[ display_currency(data) == True or removeParentNode('blockTable') ]]
<blockTable rowHeights="0.55cm" colWidths="260.0,65.0,65.0,80.0,80.0" style="Table6">[[ display_currency(data) == True or removeParentNode('blockTable') ]]
<tr>
<td>
@ -522,7 +522,7 @@
</para>
<section>
<para style="P1">[[ repeatIn(lines(p), 'line') ]]</para>
<blockTable colWidths="50.0,40.0,60.0,50.0,60.0,65.0,65.0,80.0,80.0" style="Table7">[[ display_currency(data) == True or removeParentNode('blockTable') ]]
<blockTable rowHeights="0.55cm" colWidths="50.0,40.0,60.0,50.0,60.0,65.0,65.0,80.0,80.0" style="Table7">[[ display_currency(data) == True or removeParentNode('blockTable') ]]
<tr>
<td>
<para style="P3">[[ formatLang(line['date'],date=True) ]]</para>
@ -557,7 +557,6 @@
<font color="white"> </font>
</para>
</section>
<para style="terp_default_9">
<font color="white"> </font>
</para>

View File

@ -524,7 +524,7 @@
</blockTable>
<section>
<para style="P3">[[ repeatIn(objects, 'p') ]] [[ setLang(p.lang) ]]</para>
<blockTable colWidths="329.0,70.0,70.0,80.0" style="Table2">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
<blockTable rowHeights="0.55cm" colWidths="329.0,70.0,70.0,80.0" style="Table2">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
<tr>
<td>
@ -557,7 +557,7 @@
</blockTable>
<section>
<para style="P1">[[ repeatIn(lines(p), 'line') ]]</para>
<blockTable colWidths="50.0,50.0,70.0,50.0,109.0,70.0,70.0,80.0" style="Table3">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
<blockTable rowHeights="0.55cm" colWidths="50.0,50.0,70.0,50.0,109.0,70.0,70.0,80.0" style="Table3">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
<tr>
<td>
<para style="P3">[[ formatLang(line['date'],date=True) ]]</para>
@ -621,7 +621,7 @@
<para style="P4"/>
<section>
<para style="P3">[[ repeatIn(objects, 'p') ]] [[ setLang(p.lang) ]]</para>
<blockTable colWidths="260.0,65.0,65.0,80.0,80.0" style="Table6">[[ display_currency(data) == True or removeParentNode('blockTable') ]]
<blockTable rowHeights="0.55cm" colWidths="260.0,65.0,65.0,80.0,80.0" style="Table6">[[ display_currency(data) == True or removeParentNode('blockTable') ]]
<tr>
<td>
<para style="P2">[[ p.ref ]] - [[ p.name ]]</para>
@ -661,7 +661,7 @@
</blockTable>
<section>
<para style="P1">[[ repeatIn(lines(p), 'line') ]]</para>
<blockTable colWidths="50.0,40.0,60.0,50.0,60.0,65.0,65.0,80.0,80.0" style="Table7">[[ display_currency(data) == True or removeParentNode('blockTable') ]]
<blockTable rowHeights="0.55cm" colWidths="50.0,40.0,60.0,50.0,60.0,65.0,65.0,80.0,80.0" style="Table7">[[ display_currency(data) == True or removeParentNode('blockTable') ]]
<tr>
<td>
<para style="P3"> [[ formatLang(line['date'],date=True) ]]</para>