Merge lp:~camptocamp/account-invoice-report/fix-addresses into lp:~account-core-editors/account-invoice-report/7.0

Proposed by Nicolas Bessi - Camptocamp
Status: Merged
Merged at revision: 21
Proposed branch: lp:~camptocamp/account-invoice-report/fix-addresses
Merge into: lp:~account-core-editors/account-invoice-report/7.0
Diff against target: 26 lines (+9/-5)
1 file modified
invoice_webkit/report/account_invoice.mako (+9/-5)
To merge this branch: bzr merge lp:~camptocamp/account-invoice-report/fix-addresses
Reviewer Review Type Date Requested Status
Alexandre Fayolle - camptocamp code review, no test Approve
Review via email: mp+148407@code.launchpad.net

Description of the change

Fix addresses layout in mako

To post a comment you must log in.
Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

LGTM

review: Approve (code review, no test)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'invoice_webkit/report/account_invoice.mako'
2--- invoice_webkit/report/account_invoice.mako 2013-02-08 13:49:46 +0000
3+++ invoice_webkit/report/account_invoice.mako 2013-02-14 10:24:19 +0000
4@@ -171,13 +171,17 @@
5 <% setLang(inv.partner_id.lang) %>
6 <div class="address">
7 <table class="recipient">
8+ %if inv.partner_id.parent_id:
9+ <tr><td class="name">${inv.partner_id.parent_id.name or ''}</td></tr>
10+ <tr><td>${inv.partner_id.title and inv.partner_id.title.name or ''} ${inv.partner_id.name }</td></tr>
11+ %else:
12 <tr><td class="name">${inv.partner_id.title and inv.partner_id.title.name or ''} ${inv.partner_id.name }</td></tr>
13- <tr><td>${inv.partner_id.street or ''}</td></tr>
14- <tr><td>${inv.partner_id.street2 or ''}</td></tr>
15- <tr><td>${inv.partner_id.zip or ''} ${inv.partner_id.city or ''}</td></tr>
16- %if inv.partner_id.country_id:
17- <tr><td>${inv.partner_id.country_id.name or ''} </td></tr>
18 %endif
19+ %for part in inv.partner_id.contact_address.split("\n")[1:]:
20+ %if part:
21+ <tr><td>${part}</td></tr>
22+ %endif
23+ %endfor
24 </table>
25 </div>
26 <div>

Subscribers

People subscribed via source and target branches