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

Proposed by Yannick Vaucher @ Camptocamp
Status: Merged
Merged at revision: 34
Proposed branch: lp:~camptocamp/account-invoice-report/7.0-fix-1188224
Merge into: lp:~account-core-editors/account-invoice-report/7.0
Diff against target: 31 lines (+9/-2)
1 file modified
invoice_webkit/report/account_invoice.mako (+9/-2)
To merge this branch: bzr merge lp:~camptocamp/account-invoice-report/7.0-fix-1188224
Reviewer Review Type Date Requested Status
Alexandre Fayolle - camptocamp code review, test Approve
Guewen Baconnier @ Camptocamp Approve
Review via email: mp+167781@code.launchpad.net

Description of the change

Ensure we remove only the name and not the street from the formatted address.

To post a comment you must log in.
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

LGTM

review: Approve
Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

works fine

review: Approve (code review, 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-05-27 07:52:26 +0000
3+++ invoice_webkit/report/account_invoice.mako 2013-06-06 15:19:24 +0000
4@@ -178,7 +178,12 @@
5 %else:
6 <tr><td class="name">${inv.partner_id.title and inv.partner_id.title.name or ''} ${inv.partner_id.name }</td></tr>
7 %endif
8- %for part in inv.partner_id.contact_address.split("\n")[1:]:
9+ %if inv.partner_id.parent_id:
10+ <% address_lines = inv.partner_id.contact_address.split("\n")[1:] %>
11+ %else:
12+ <% address_lines = inv.partner_id.contact_address.split("\n") %>
13+ %endif
14+ %for part in address_lines:
15 %if part:
16 <tr><td>${part}</td></tr>
17 %endif
18@@ -189,10 +194,12 @@
19 %if inv.partner_id.parent_id:
20 <tr><td class="name">${inv.partner_id.parent_id.name or ''}</td></tr>
21 <tr><td>${inv.partner_id.title and inv.partner_id.title.name or ''} ${inv.partner_id.name }</td></tr>
22+ <% address_lines = inv.partner_id.contact_address.split("\n")[1:] %>
23 %else:
24 <tr><td class="name">${inv.partner_id.title and inv.partner_id.title.name or ''} ${inv.partner_id.name }</td></tr>
25+ <% address_lines = inv.partner_id.contact_address.split("\n") %>
26 %endif
27- %for part in inv.partner_id.contact_address.split("\n")[1:]:
28+ %for part in address_lines:
29 %if part:
30 <tr><td>${part}</td></tr>
31 %endif

Subscribers

People subscribed via source and target branches