← Back to team overview

openerp-community-reviewer team mailing list archive

[Merge] lp:~camptocamp/purchase-report/purchase_report_carriage_return_vre into lp:purchase-report

 

Vincent Renaville@camptocamp has proposed merging lp:~camptocamp/purchase-report/purchase_report_carriage_return_vre into lp:purchase-report.

Requested reviews:
  Purchase Core Editors (purchase-core-editors)

For more details, see:
https://code.launchpad.net/~camptocamp/purchase-report/purchase_report_carriage_return_vre/+merge/214030

This add the possibility to add carriage return in the name of the product description.

-- 
https://code.launchpad.net/~camptocamp/purchase-report/purchase_report_carriage_return_vre/+merge/214030
Your team Purchase Core Editors is requested to review the proposed merge of lp:~camptocamp/purchase-report/purchase_report_carriage_return_vre into lp:purchase-report.
=== modified file 'purchase_order_webkit/report/purchase_order.mako'
--- purchase_order_webkit/report/purchase_order.mako	2014-01-22 10:39:22 +0000
+++ purchase_order_webkit/report/purchase_order.mako	2014-04-03 13:32:26 +0000
@@ -179,27 +179,34 @@
 }
 td.main_col1 {
     text-align:left;
+    vertical-align:top;
 }
 .main_col2 {
     width: 10%;
+    vertical-align:top;
 }
 .main_col3 {
     width: 10%;
     text-align:center;
+    vertical-align:top;
 }
 .main_col6 {
     width: 10%;
+    vertical-align:top;
 }
 .main_col4 {
 	width: 10%;
 	text-align:right;
+    vertical-align:top;
 }
 .main_col5 {
     width: 7%;
     text-align:left;
+    vertical-align:top;
 }
 .main_col7 {
     width: 13%;
+    vertical-align:top;
 }
 
 
@@ -297,12 +304,12 @@
               <div class="nobreak">
                 <table style="width:100%">
                   <tr>
-                    <td class="main_col1">${line.name}</td>
+                    <td class="main_col1">${line.name and line.name.replace('\n','<br/>') or '' | n}</td>
                     <td style="text-align:center" class="main_col2">${ ', '.join([ tax.name or '' for tax in line.taxes_id ])}</td>
                     <td style="text-align:center" class="main_col3">${formatLang(line.date_planned, date=True)}</td>
                     <td class="amount main_col4">${line.product_qty}</td>
                     <td class="main_col5">${line.product_uom.name}</td>
-                    <td class="amount main col6">${formatLang(line.price_unit, digits=get_digits(dp='Purchase Price'))}</td>
+                    <td class="amount main_col6">${formatLang(line.price_unit, digits=get_digits(dp='Purchase Price'))}</td>
                     <td class="amount main_col7">${formatLang(line.price_subtotal, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol}</td>
                   </tr>
                  </table>

=== modified file 'purchase_order_webkit/report/request_quotation.mako'
--- purchase_order_webkit/report/request_quotation.mako	2014-01-10 14:52:43 +0000
+++ purchase_order_webkit/report/request_quotation.mako	2014-04-03 13:32:26 +0000
@@ -179,27 +179,34 @@
 }
 td.main_col1 {
     text-align:left;
+    vertical-align:top;
 }
 .main_col2 {
     width: 10%;
+    vertical-align:top;
 }
 .main_col3 {
     width: 10%;
     text-align:center;
+    vertical-align:top;
 }
 .main_col6 {
     width: 10%;
+    vertical-align:top;
 }
 .main_col4 {
     width: 10%;
     text-align:right;
+    vertical-align:top;
 }
 .main_col5 {
     width: 7%;
     text-align:left;
+    vertical-align:top;
 }
 .main_col7 {
     width: 13%;
+    vertical-align:top;
 }
 
 
@@ -263,9 +270,9 @@
                 <tr>
 	          <th class="list_main_headers" style="width: 100%">
 	            <table style="width:100%">
-                    <th>${_("Description")}</th>
-                    <th>${_("Expected Date")}</th>
-                    <th class="amount">${_("Qty")}</th>
+                    <th class="main_col1">${_("Description")}</th>
+                    <th class="main_col3">${_("Expected Date")}</th>
+                    <th style="text-align:center" class="amount main_col4">${_("Qty")}</th>
                   </tr>
                 </table>
               </th>
@@ -279,9 +286,9 @@
                   <tr>
 		            %for line in purch.order_line :
 		                <tr class="line">
-		                    <td>${line.name}</td>
-		                    <td>${formatLang(line.date_planned, date=True)}</td>
-		                    <td class="amount">${line.product_qty} ${line.product_uom and line.product_uom.name or ''}</td>
+		                    <td class="main_col1">${line.name and line.name.replace('\n','<br/>') or '' | n}</td>
+		                    <td style="text-align:center" class="main_col3">${formatLang(line.date_planned, date=True)}</td>
+		                    <td class="amount main_col4">${line.product_qty} ${line.product_uom and line.product_uom.name or ''}</td>
                         </tr>
                     %endfor
                  </table>

=== modified file 'purchase_order_webkit_with_notes/report/purchase_order.mako'
--- purchase_order_webkit_with_notes/report/purchase_order.mako	2014-01-22 10:39:22 +0000
+++ purchase_order_webkit_with_notes/report/purchase_order.mako	2014-04-03 13:32:26 +0000
@@ -179,27 +179,34 @@
 }
 td.main_col1 {
     text-align:left;
+    vertical-align:top;
 }
 .main_col2 {
     width: 10%;
+    vertical-align:top;
 }
 .main_col3 {
     width: 10%;
     text-align:center;
+    vertical-align:top;
 }
 .main_col6 {
     width: 10%;
+    vertical-align:top;
 }
 .main_col4 {
 	width: 10%;
 	text-align:right;
+    vertical-align:top;
 }
 .main_col5 {
     width: 7%;
     text-align:left;
+    vertical-align:top;
 }
 .main_col7 {
     width: 13%;
+    vertical-align:top;
 }
 
 
@@ -300,12 +307,12 @@
               <div class="nobreak">
                 <table style="width:100%">
                   <tr>
-                    <td class="main_col1">${line.name}</td>
+                    <td class="main_col1">${line.name and line.name.replace('\n','<br/>') or '' | n}</td>
                     <td style="text-align:center" class="main_col2">${ ', '.join([ tax.name or '' for tax in line.taxes_id ])}</td>
                     <td style="text-align:center" class="main_col3">${formatLang(line.date_planned, date=True)}</td>
                     <td class="amount main_col4">${line.product_qty}</td>
                     <td class="main_col5">${line.product_uom.name}</td>
-                    <td class="amount main col6">${formatLang(line.price_unit, digits=get_digits(dp='Purchase Price'))}</td>
+                    <td class="amount main_col6">${formatLang(line.price_unit, digits=get_digits(dp='Purchase Price'))}</td>
                     <td class="amount main_col7">${formatLang(line.price_subtotal, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol}</td>
                   </tr>
                  </table>

=== modified file 'purchase_order_webkit_with_notes/report/request_quotation.mako'
--- purchase_order_webkit_with_notes/report/request_quotation.mako	2014-01-17 15:26:14 +0000
+++ purchase_order_webkit_with_notes/report/request_quotation.mako	2014-04-03 13:32:26 +0000
@@ -179,27 +179,34 @@
 }
 td.main_col1 {
     text-align:left;
+    vertical-align:top;
 }
 .main_col2 {
     width: 10%;
+    vertical-align:top;
 }
 .main_col3 {
     width: 10%;
     text-align:center;
+    vertical-align:top;
 }
 .main_col6 {
     width: 10%;
+    vertical-align:top;
 }
 .main_col4 {
     width: 10%;
     text-align:right;
+    vertical-align:top;
 }
 .main_col5 {
     width: 7%;
     text-align:left;
+    vertical-align:top;
 }
 .main_col7 {
     width: 13%;
+    vertical-align:top;
 }
 
 
@@ -266,9 +273,9 @@
                 <tr>
 	          <th class="list_main_headers" style="width: 100%">
 	            <table style="width:100%">
-                    <th>${_("Description")}</th>
-                    <th>${_("Expected Date")}</th>
-                    <th class="amount">${_("Qty")}</th>
+                    <th class="main_col1">${_("Description")}</th>
+                    <th class="main_col3">${_("Expected Date")}</th>
+                    <th style="text-align:center" class="amount main_col4">${_("Qty")}</th>
                   </tr>
                 </table>
               </th>
@@ -282,9 +289,9 @@
                   <tr>
 		            %for line in purch.order_line :
 		                <tr class="line">
-		                    <td>${line.name}</td>
-		                    <td>${formatLang(line.date_planned, date=True)}</td>
-		                    <td class="amount">${line.product_qty} ${line.product_uom and line.product_uom.name or ''}</td>
+		                    <td class="main_col1">${line.name and line.name.replace('\n','<br/>') or '' | n}</td>
+		                    <td style="text-align:center" class="main_col3">${formatLang(line.date_planned, date=True)}</td>
+		                    <td class="amount main_col4">${line.product_qty} ${line.product_uom and line.product_uom.name or ''}</td>
                         </tr>
                     %endfor
                  </table>


Follow ups