Merge lp:~agilebg/sale-reports/7_fix_1315445 into lp:~sale-core-editors/sale-reports/7.0

Proposed by Lorenzo Battistini
Status: Needs review
Proposed branch: lp:~agilebg/sale-reports/7_fix_1315445
Merge into: lp:~sale-core-editors/sale-reports/7.0
Diff against target: 384 lines (+177/-145)
1 file modified
sale_order_webkit/report/sale_order.mako (+177/-145)
To merge this branch: bzr merge lp:~agilebg/sale-reports/7_fix_1315445
Reviewer Review Type Date Requested Status
Yannick Vaucher @ Camptocamp moved on github Needs Resubmitting
Review via email: mp+223795@code.launchpad.net
To post a comment you must log in.
28. By Lorenzo Battistini

[FIX] table footer borders

29. By Lorenzo Battistini

[FIX] thin shipping address

Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

This project is now hosted on https://github.com/OCA/sale-reports. Please move your proposal there. This guide may help you https://github.com/OCA/maintainers-tools/wiki/How-to-move-a-Merge-Proposal-to-GitHub

review: Needs Resubmitting (moved on github)
30. By Lorenzo Battistini

[MERGE] from main

Revision history for this message
Lorenzo Battistini (elbati) wrote :

Unmerged revisions

30. By Lorenzo Battistini

[MERGE] from main

29. By Lorenzo Battistini

[FIX] thin shipping address

28. By Lorenzo Battistini

[FIX] table footer borders

27. By Lorenzo Battistini

[FIX] sale_order_webkit - 'Description' field overlaps the next one 'Qty' when it is very long

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'sale_order_webkit/report/sale_order.mako'
2--- sale_order_webkit/report/sale_order.mako 2014-02-17 10:20:33 +0000
3+++ sale_order_webkit/report/sale_order.mako 2014-07-23 17:26:13 +0000
4@@ -8,92 +8,113 @@
5 border:thin solid #E3E4EA;
6 text-align:center;
7 border-collapse: collapse;
8-}
9-table.list_main_table {
10- margin-top: 20px;
11-}
12-.list_main_headers {
13- padding: 0;
14-}
15-.list_main_headers th {
16+ margin-top: 15px;
17+}
18+.list_main_table th {
19+ background-color: #EEEEEE;
20 border: thin solid #000000;
21+ text-align:center;
22+ font-size:12;
23+ font-weight:bold;
24 padding-right:3px;
25 padding-left:3px;
26- background-color: #EEEEEE;
27- text-align:center;
28- font-size:12;
29- font-weight:bold;
30 }
31 .list_main_table td {
32+ border-bottom : thin solid #EEEEEE;
33+ text-align:left;
34+ font-size:12;
35 padding-right:3px;
36 padding-left:3px;
37 padding-top:3px;
38 padding-bottom:3px;
39 }
40-.list_main_lines,
41-.list_main_footers {
42- padding: 0;
43-}
44-.list_main_footers {
45- padding-top: 15px;
46-}
47-.list_main_lines td,
48-.list_main_footers td,
49-.list_main_footers th {
50- border-style: none;
51- text-align:left;
52- font-size:12;
53- padding:0;
54-}
55-.list_main_footers th {
56- text-align:right;
57-}
58-
59-td .total_empty_cell {
60- width: 77%;
61-}
62-td .total_sum_cell {
63- width: 13%;
64-}
65-
66-.nobreak {
67- page-break-inside: avoid;
68-}
69-caption.formatted_note {
70- text-align:left;
71- border-right:thin solid #EEEEEE;
72- border-left:thin solid #EEEEEE;
73- border-top:thin solid #EEEEEE;
74+.list_main_table thead {
75+ display:table-header-group;
76+}
77+
78+div.formatted_note {
79+ text-align:left;
80 padding-left:10px;
81 font-size:11;
82- caption-side: bottom;
83-}
84-caption.formatted_note p {
85- margin: 0;
86-}
87-
88-.main_col1 {
89- width: 40%;
90-}
91-td.main_col1 {
92- text-align:left;
93-}
94-.main_col2,
95-.main_col3,
96-.main_col4,
97-.main_col6 {
98- width: 10%;
99-}
100-.main_col5 {
101- width: 7%;
102-}
103-td.main_col5 {
104- text-align: center;
105- font-style:italic;
106- font-size: 10;
107-}
108-.main_col7 {
109- width: 13%;
110+}
111+
112+
113+.list_bank_table {
114+ text-align:center;
115+ border-collapse: collapse;
116+ page-break-inside: avoid;
117+ display:table;
118+}
119+
120+.act_as_row {
121+ display:table-row;
122+}
123+.list_bank_table .act_as_thead {
124+ background-color: #EEEEEE;
125+ text-align:left;
126+ font-size:12;
127+ font-weight:bold;
128+ padding-right:3px;
129+ padding-left:3px;
130+ white-space:nowrap;
131+ background-clip:border-box;
132+ display:table-cell;
133+}
134+.list_bank_table .act_as_cell {
135+ text-align:left;
136+ font-size:12;
137+ padding-right:3px;
138+ padding-left:3px;
139+ padding-top:3px;
140+ padding-bottom:3px;
141+ white-space:nowrap;
142+ display:table-cell;
143+}
144+
145+
146+.list_tax_table {
147+}
148+.list_tax_table td {
149+ text-align:left;
150+ font-size:12;
151+}
152+.list_tax_table th {
153+}
154+.list_tax_table thead {
155+ display:table-header-group;
156+}
157+
158+
159+.list_total_table {
160+ border:thin solid #E3E4EA;
161+ text-align:center;
162+ border-collapse: collapse;
163+}
164+.list_total_table td {
165+ border-top : thin solid #EEEEEE;
166+ text-align:left;
167+ font-size:12;
168+ padding-right:3px;
169+ padding-left:3px;
170+ padding-top:3px;
171+ padding-bottom:3px;
172+}
173+.list_total_table th {
174+ background-color: #EEEEEE;
175+ border: thin solid #000000;
176+ text-align:center;
177+ font-size:12;
178+ font-weight:bold;
179+ padding-right:3px
180+ padding-left:3px
181+}
182+.list_total_table thead {
183+ display:table-header-group;
184+}
185+
186+
187+.no_bloc {
188+ border-top: thin solid #ffffff ;
189 }
190
191 .right_table {
192@@ -105,6 +126,14 @@
193 font-size:12;
194 }
195
196+tfoot.totals tr:first-child td{
197+ padding-top: 15px;
198+}
199+
200+tfoot.totals td {
201+ border: thin solid #ffffff;
202+}
203+
204 th.date {
205 width: 90px;
206 }
207@@ -113,16 +142,40 @@
208 text-align: right;
209 white-space: nowrap;
210 }
211+.header_table {
212+ text-align: center;
213+ border: 1px solid lightGrey;
214+ border-collapse: collapse;
215+}
216+.header_table th {
217+ font-size: 12px;
218+ border: 1px solid lightGrey;
219+}
220+.header_table td {
221+ font-size: 12px;
222+ border: 1px solid lightGrey;
223+}
224
225 td.date {
226 white-space: nowrap;
227 width: 90px;
228 }
229
230-.address .recipient .shipping .invoice {
231+td.vat {
232+ white-space: nowrap;
233+}
234+.address .recipient {
235 font-size: 12px;
236 }
237
238+.nobreak {
239+ page-break-inside: avoid;
240+ }
241+
242+.align_top {
243+ vertical-align:text-top;
244+ }
245+
246 </style>
247 </head>
248 <body>
249@@ -197,86 +250,65 @@
250
251 <table class="list_main_table" width="100%">
252 <thead>
253- <tr>
254- <th class="list_main_headers" style="width: 100%">
255- <table style="width:100%">
256- <tr>
257- <th class="main_col1">${_("Description")}</th>
258- <th class="amount main_col2">${_("Quantity")}</th>
259- <th class="amount main_col3">${_("UoM")}</th>
260- <th class="amount main_col4">${_("Unit Price")}</th>
261- <th class="main_col5">${_("VAT")}</th>
262- %if show_discount(user.id):
263- <th class="amount main_col6">${_("Disc.(%)")}</th>
264- %endif
265- <th class="amount main_col7">${_("Price")}</th>
266- </tr>
267- </table>
268- </th>
269- </tr>
270+ <tr>
271+ <th class="main_col1">${_("Description")}</th>
272+ <th class="amount main_col2">${_("Quantity")}</th>
273+ <th class="amount main_col3">${_("UoM")}</th>
274+ <th class="amount main_col4">${_("Unit Price")}</th>
275+ <th class="main_col5">${_("VAT")}</th>
276+ %if show_discount(user.id):
277+ <th class="amount main_col6">${_("Disc.(%)")}</th>
278+ %endif
279+ <th class="amount main_col7">${_("Price")}</th>
280+ </tr>
281 </thead>
282 <tbody>
283 %for line in order.order_line:
284 <tr>
285- <td class="list_main_lines" style="width: 100%">
286- <div class="nobreak">
287- <table style="width:100%">
288- <tr>
289- <td class="main_col1">${ line.name }</td>
290- <td class="amount main_col2">${ formatLang(line.product_uos and line.product_uos_qty or line.product_uom_qty) }</td>
291- <td class="amount main_col3">${ line.product_uos and line.product_uos.name or line.product_uom.name }</td>
292- <td class="amount main_col4">${formatLang(line.price_unit)}</td>
293- <td class="main_col5">${ ', '.join([tax.description or tax.name for tax in line.tax_id]) }</td>
294- %if show_discount(user.id):
295- <td class="amount main_col6">${line.discount and formatLang(line.discount, digits=get_digits(dp='Sale Price')) or ''} ${line.discount and '%' or ''}</td>
296- %endif
297- <td class="amount main_col7">${formatLang(line.price_subtotal, digits=get_digits(dp='Sale Price'))}&nbsp;${order.pricelist_id.currency_id.symbol}</td>
298- </tr>
299- %if line.formatted_note:
300- <caption class="formatted_note">
301- ${line.formatted_note| n}
302- </caption>
303- %endif
304- </table>
305- </div>
306+ <td class="align_top"><div class="nobreak">${line.name.replace('\n','<br/>') or '' | n}
307+ %if line.formatted_note:
308+ <br />
309+ <div class="formatted_note">${line.formatted_note| n}</div>
310+ %endif
311+ </div>
312 </td>
313+ <td class="amount main_col2 align_top">${ formatLang(line.product_uos and line.product_uos_qty or line.product_uom_qty) }</td>
314+ <td class="amount main_col3 align_top">${ line.product_uos and line.product_uos.name or line.product_uom.name }</td>
315+ <td class="amount main_col4 align_top">${formatLang(line.price_unit)}</td>
316+ <td class="main_col5 align_top">${ ', '.join([tax.description or tax.name for tax in line.tax_id]) }</td>
317+ %if show_discount(user.id):
318+ <td class="amount main_col6 align_top">${line.discount and formatLang(line.discount, digits=get_digits(dp='Sale Price')) or ''} ${line.discount and '%' or ''}</td>
319+ %endif
320+ <td class="amount main_col7 align_top">${formatLang(line.price_subtotal, digits=get_digits(dp='Sale Price'))}&nbsp;${order.pricelist_id.currency_id.symbol}</td>
321 </tr>
322 %endfor
323 </tbody>
324 <tfoot class="totals">
325 <tr>
326- <td class="list_main_footers" style="width: 100%">
327- <div class="nobreak">
328- <table style="width:100%">
329- <tr>
330- <td class="total_empty_cell"/>
331- <th>
332- ${_("Net Total:")}
333- </th>
334- <td class="amount total_sum_cell">
335- ${formatLang(order.amount_untaxed, get_digits(dp='Sale Price'))} ${order.pricelist_id.currency_id.symbol}
336- </td>
337- </tr>
338- <tr>
339- <td class="total_empty_cell"/>
340- <th>
341- ${_("Taxes:")}
342- </th>
343- <td class="amount total_sum_cell">
344- ${formatLang(order.amount_tax, get_digits(dp='Sale Price'))} ${order.pricelist_id.currency_id.symbol}
345- </td>
346- </tr>
347- <tr>
348- <td class="total_empty_cell"/>
349- <th>
350- ${_("Total:")}
351- </th>
352- <td class="amount total_sum_cell">
353- <b>${formatLang(order.amount_total, get_digits(dp='Sale Price'))} ${order.pricelist_id.currency_id.symbol}</b>
354- </td>
355- </tr>
356- </table>
357- </div>
358+ <td colspan="4" class="total_empty_cell"/>
359+ <td style="font-weight:bold">
360+ ${_("Net Total:")}
361+ </td>
362+ <td class="amount total_sum_cell">
363+ ${formatLang(order.amount_untaxed, get_digits(dp='Sale Price'))} ${order.pricelist_id.currency_id.symbol}
364+ </td>
365+ </tr>
366+ <tr>
367+ <td colspan="4" class="total_empty_cell"/>
368+ <td style="font-weight:bold">
369+ ${_("Taxes:")}
370+ </td>
371+ <td class="amount total_sum_cell">
372+ ${formatLang(order.amount_tax, get_digits(dp='Sale Price'))} ${order.pricelist_id.currency_id.symbol}
373+ </td>
374+ </tr>
375+ <tr>
376+ <td colspan="4" class="total_empty_cell"/>
377+ <td style="font-weight:bold">
378+ ${_("Total:")}
379+ </td>
380+ <td class="amount total_sum_cell">
381+ <b>${formatLang(order.amount_total, get_digits(dp='Sale Price'))} ${order.pricelist_id.currency_id.symbol}</b>
382 </td>
383 </tr>
384 </tfoot>

Subscribers

People subscribed via source and target branches