[IMP]account_check_writing: Remove get_zip_line() and add display_address() function
bzr revid: atp@tinyerp.com-20121002140905-jmiudzxe3pqdroha
This commit is contained in:
parent
082f70cb6f
commit
c12510e6e4
|
@ -32,7 +32,6 @@ class report_print_check(report_sxw.rml_parse):
|
||||||
'time': time,
|
'time': time,
|
||||||
'get_lines': self.get_lines,
|
'get_lines': self.get_lines,
|
||||||
'fill_stars' : self.fill_stars,
|
'fill_stars' : self.fill_stars,
|
||||||
'get_zip_line': self.get_zip_line,
|
|
||||||
})
|
})
|
||||||
def fill_stars(self, amount):
|
def fill_stars(self, amount):
|
||||||
amount = amount.replace('Dollars','')
|
amount = amount.replace('Dollars','')
|
||||||
|
@ -41,25 +40,6 @@ class report_print_check(report_sxw.rml_parse):
|
||||||
return ' '.join([amount,'*'*stars])
|
return ' '.join([amount,'*'*stars])
|
||||||
|
|
||||||
else: return amount
|
else: return amount
|
||||||
|
|
||||||
def get_zip_line(self, address):
|
|
||||||
'''
|
|
||||||
Get the address line
|
|
||||||
'''
|
|
||||||
ret = ''
|
|
||||||
if address:
|
|
||||||
if address.city:
|
|
||||||
ret += address.city
|
|
||||||
if address.state_id:
|
|
||||||
if address.state_id.name:
|
|
||||||
if ret:
|
|
||||||
ret += ', '
|
|
||||||
ret += address.state_id.name
|
|
||||||
if address.zip:
|
|
||||||
if ret:
|
|
||||||
ret += ' '
|
|
||||||
ret += address.zip
|
|
||||||
return ret
|
|
||||||
|
|
||||||
def get_lines(self, voucher_lines):
|
def get_lines(self, voucher_lines):
|
||||||
result = []
|
result = []
|
||||||
|
|
|
@ -281,10 +281,7 @@
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="P15">[[ voucher.partner_id.name ]]</para>
|
<para style="P15">[[ voucher.partner_id.name ]]</para>
|
||||||
<para style="P15">[[ voucher.partner_id.street or removeParentNode('para') ]]</para>
|
<para style="P15">[[ display_address(voucher.partner_id) or removeParentNode('para') ]]</para>
|
||||||
<para style="P15">[[ voucher.partner_id.street2 or removeParentNode('para') ]]</para>
|
|
||||||
<para style="P15">[[ get_zip_line(voucher.partner_id) ]] </para>
|
|
||||||
<para style="P15">[[ voucher.partner_id.country_id.name]]</para>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</blockTable>
|
</blockTable>
|
||||||
|
|
|
@ -237,10 +237,7 @@
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="P15">[[ voucher.partner_id.name ]]</para>
|
<para style="P15">[[ voucher.partner_id.name ]]</para>
|
||||||
<para style="P15">[[ voucher.partner_id.street or removeParentNode('para') ]]</para>
|
<para style="P15">[[ display_address(voucher.partner_id) or removeParentNode('para') ]]</para>
|
||||||
<para style="P15">[[ voucher.partner_id.street2 or removeParentNode('para') ]]</para>
|
|
||||||
<para style="P15">[[ get_zip_line(voucher.partner_id) ]] </para>
|
|
||||||
<para style="P15">[[ voucher.partner_id.country_id.name]]</para>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</blockTable>
|
</blockTable>
|
||||||
|
|
|
@ -153,9 +153,7 @@
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="P9">[[ voucher.partner_id.name ]] </para>
|
<para style="P9">[[ voucher.partner_id.name ]] </para>
|
||||||
<para style="P15">[[ voucher.partner_id.street2 or removeParentNode('para') ]]</para>
|
<para style="P15">[[ display_address(voucher.partner_id) or removeParentNode('para') ]]</para>
|
||||||
<para style="P15">[[ get_zip_line(voucher.partner_id) ]] </para>
|
|
||||||
<para style="P15">[[ voucher.partner_id.country_id.name]]</para>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para/>
|
<para/>
|
||||||
|
|
Loading…
Reference in New Issue