Merge lp:~openerp-community/openerp-canada/6.1-l10n_ca_account_check_writing into lp:openerp-canada/6.1

Proposed by Joao Alfredo Gama Batista
Status: Merged
Merged at revision: 9
Proposed branch: lp:~openerp-community/openerp-canada/6.1-l10n_ca_account_check_writing
Merge into: lp:openerp-canada/6.1
Diff against target: 70 lines (+27/-4)
2 files modified
l10n_ca_account_check_writing/report/l10n_ca_check_print.py (+22/-2)
l10n_ca_account_check_writing/report/l10n_ca_check_print_middle.rml (+5/-2)
To merge this branch: bzr merge lp:~openerp-community/openerp-canada/6.1-l10n_ca_account_check_writing
Reviewer Review Type Date Requested Status
Maxime Chambreuil (http://www.savoirfairelinux.com) lgtm, no test. Approve
Review via email: mp+161032@code.launchpad.net

Description of the change

- Fixed address issue

To post a comment you must log in.
Revision history for this message
Maxime Chambreuil (http://www.savoirfairelinux.com) (max3903) :
review: Approve (lgtm, no test.)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'l10n_ca_account_check_writing/report/l10n_ca_check_print.py'
--- l10n_ca_account_check_writing/report/l10n_ca_check_print.py 2013-04-25 21:02:28 +0000
+++ l10n_ca_account_check_writing/report/l10n_ca_check_print.py 2013-04-25 22:25:30 +0000
@@ -32,12 +32,13 @@
32 self.localcontext.update({32 self.localcontext.update({
33 'time': time,33 'time': time,
34 'get_lines': self.get_lines,34 'get_lines': self.get_lines,
35 'get_zip_line': self.get_zip_line,
35 'fill_stars' : self.fill_stars,36 'fill_stars' : self.fill_stars,
36 })37 })
37 def fill_stars(self, amount):38 def fill_stars(self, amount):
38 amount = amount.replace('Dollars','')39 amount = amount.replace('Dollars','')
39 if len(amount) < 100:40 if len(amount) < 90:
40 stars = 100 - len(amount)41 stars = 90 - len(amount)
41 return ' '.join([amount,'*'*stars])42 return ' '.join([amount,'*'*stars])
4243
43 else: return amount44 else: return amount
@@ -65,6 +66,25 @@
65 result.append(res)66 result.append(res)
66 return result67 return result
6768
69 def get_zip_line(self, address):
70 '''
71 Get the address line
72 '''
73 ret = ''
74 if address:
75 if address.city:
76 ret += address.city
77 if address.state_id:
78 if address.state_id.name:
79 if ret:
80 ret += ', '
81 ret += address.state_id.name
82 if address.zip:
83 if ret:
84 ret += ' '
85 ret += address.zip
86 return ret
87
68report_sxw.report_sxw(88report_sxw.report_sxw(
69 'report.l10n.ca.account.print.check.top',89 'report.l10n.ca.account.print.check.top',
70 'account.voucher',90 'account.voucher',
7191
=== modified file 'l10n_ca_account_check_writing/report/l10n_ca_check_print_middle.rml'
--- l10n_ca_account_check_writing/report/l10n_ca_check_print_middle.rml 2013-04-25 21:02:28 +0000
+++ l10n_ca_account_check_writing/report/l10n_ca_check_print_middle.rml 2013-04-25 22:25:30 +0000
@@ -203,7 +203,7 @@
203 </tr>203 </tr>
204 </blockTable>204 </blockTable>
205205
206 <blockTable colWidths="30.0,538.0" rowHeights="15.0" style="Table5">206 <blockTable colWidths="30.0,528.0" rowHeights="15.0" style="Table5">
207 <tr>207 <tr>
208 <td>208 <td>
209 <para style="P3"><font color="white"> </font></para>209 <para style="P3"><font color="white"> </font></para>
@@ -235,7 +235,10 @@
235 </td>235 </td>
236 <td>236 <td>
237 <para style="P15">[[ voucher.partner_id.name ]]</para>237 <para style="P15">[[ voucher.partner_id.name ]]</para>
238 <para style="P15">[[ display_address(voucher.partner_id) or removeParentNode('para') ]]</para>238 <para style="P15">[[ voucher.partner_id.address and voucher.partner_id.address[0] and voucher.partner_id.address[0].street or removeParentNode('para') ]]</para>
239 <para style="P15">[[ voucher.partner_id.address and voucher.partner_id.address[0] and voucher.partner_id.address[0].street2 or removeParentNode('para') ]]</para>
240 <para style="P15">[[ get_zip_line(voucher.partner_id.address[0]) ]] </para>
241 <para style="P15">[[ voucher.partner_id.address[0].country_id.name]]</para>
239 </td>242 </td>
240 <td>243 <td>
241 <para style="P3"><font color="white"> </font></para>244 <para style="P3"><font color="white"> </font></para>

Subscribers

People subscribed via source and target branches