Lorenzo Battistini - Agile BG has proposed merging 
lp:~agilebg/sale-reports/7_fix_1315445 into lp:sale-reports.

Requested reviews:
  Sale Core Editors (sale-core-editors)
Related bugs:
  Bug #1315445 in Sales - Reports: "[7.0] sale_order_webkit - 'Description' 
field overlaps the next one 'Qty' when it is very long"
  https://bugs.launchpad.net/sale-reports/+bug/1315445

For more details, see:
https://code.launchpad.net/~agilebg/sale-reports/7_fix_1315445/+merge/223795

Same as 
https://code.launchpad.net/~agilebg/account-invoice-report/7.0-fix_invoice_webkit_description_bugs/+merge/205204
-- 
https://code.launchpad.net/~agilebg/sale-reports/7_fix_1315445/+merge/223795
Your team Sale Core Editors is requested to review the proposed merge of 
lp:~agilebg/sale-reports/7_fix_1315445 into lp:sale-reports.
=== modified file 'sale_order_webkit/report/sale_order.mako'
--- sale_order_webkit/report/sale_order.mako	2014-02-17 10:20:33 +0000
+++ sale_order_webkit/report/sale_order.mako	2014-06-19 17:05:51 +0000
@@ -8,92 +8,113 @@
     border:thin solid #E3E4EA;
     text-align:center;
     border-collapse: collapse;
-}
-table.list_main_table {
-    margin-top: 20px;
-}
-.list_main_headers {
-    padding: 0;
-}
-.list_main_headers th {
+    margin-top: 15px;
+}
+.list_main_table th {
+    background-color: #EEEEEE;
     border: thin solid #000000;
+    text-align:center;
+    font-size:12;
+    font-weight:bold;
     padding-right:3px;
     padding-left:3px;
-    background-color: #EEEEEE;
-    text-align:center;
-    font-size:12;
-    font-weight:bold;
 }
 .list_main_table td {
+    border-bottom : thin solid #EEEEEE;
+    text-align:left;
+    font-size:12;
     padding-right:3px;
     padding-left:3px;
     padding-top:3px;
     padding-bottom:3px;
 }
-.list_main_lines,
-.list_main_footers {
-    padding: 0;
-}
-.list_main_footers {
-    padding-top: 15px;
-}
-.list_main_lines td,
-.list_main_footers td,
-.list_main_footers th {
-    border-style: none;
-    text-align:left;
-    font-size:12;
-    padding:0;
-}
-.list_main_footers th {
-    text-align:right;
-}
-
-td .total_empty_cell {
-    width: 77%;
-}
-td .total_sum_cell {
-    width: 13%;
-}
-
-.nobreak {
-    page-break-inside: avoid;
-}
-caption.formatted_note {
-    text-align:left;
-    border-right:thin solid #EEEEEE;
-    border-left:thin solid #EEEEEE;
-    border-top:thin solid #EEEEEE;
+.list_main_table thead {
+    display:table-header-group;
+}
+
+div.formatted_note {
+    text-align:left;
     padding-left:10px;
     font-size:11;
-    caption-side: bottom;
-}
-caption.formatted_note p {
-    margin: 0;
-}
-
-.main_col1 {
-    width: 40%;
-}
-td.main_col1 {
-    text-align:left;
-}
-.main_col2,
-.main_col3,
-.main_col4,
-.main_col6 {
-    width: 10%;
-}
-.main_col5 {
-    width: 7%;
-}
-td.main_col5 {
-    text-align: center;
-    font-style:italic;
-    font-size: 10;
-}
-.main_col7 {
-    width: 13%;
+}
+
+
+.list_bank_table {
+    text-align:center;
+    border-collapse: collapse;
+    page-break-inside: avoid;
+    display:table;
+}
+
+.act_as_row {
+   display:table-row;
+}
+.list_bank_table .act_as_thead {
+    background-color: #EEEEEE;
+    text-align:left;
+    font-size:12;
+    font-weight:bold;
+    padding-right:3px;
+    padding-left:3px;
+    white-space:nowrap;
+    background-clip:border-box;
+    display:table-cell;
+}
+.list_bank_table .act_as_cell {
+    text-align:left;
+    font-size:12;
+    padding-right:3px;
+    padding-left:3px;
+    padding-top:3px;
+    padding-bottom:3px;
+    white-space:nowrap;
+    display:table-cell;
+}
+
+
+.list_tax_table {
+}
+.list_tax_table td {
+    text-align:left;
+    font-size:12;
+}
+.list_tax_table th {
+}
+.list_tax_table thead {
+    display:table-header-group;
+}
+
+
+.list_total_table {
+    border:thin solid #E3E4EA;
+    text-align:center;
+    border-collapse: collapse;
+}
+.list_total_table td {
+    border-top : thin solid #EEEEEE;
+    text-align:left;
+    font-size:12;
+    padding-right:3px;
+    padding-left:3px;
+    padding-top:3px;
+    padding-bottom:3px;
+}
+.list_total_table th {
+    background-color: #EEEEEE;
+    border: thin solid #000000;
+    text-align:center;
+    font-size:12;
+    font-weight:bold;
+    padding-right:3px
+    padding-left:3px
+}
+.list_total_table thead {
+    display:table-header-group;
+}
+
+
+.no_bloc {
+    border-top: thin solid  #ffffff ;
 }
 
 .right_table {
@@ -105,6 +126,14 @@
     font-size:12;
 }
 
+tfoot.totals tr:first-child td{
+    padding-top: 15px;
+}
+
+tfoot.totals td {
+    border: none;
+}
+
 th.date {
     width: 90px;
 }
@@ -113,16 +142,43 @@
     text-align: right;
     white-space: nowrap;
 }
+.header_table {
+    text-align: center;
+    border: 1px solid lightGrey;
+    border-collapse: collapse;
+}
+.header_table th {
+    font-size: 12px;
+    border: 1px solid lightGrey;
+}
+.header_table td {
+    font-size: 12px;
+    border: 1px solid lightGrey;
+}
 
 td.date {
     white-space: nowrap;
     width: 90px;
 }
 
-.address .recipient .shipping .invoice {
+td.vat {
+    white-space: nowrap;
+}
+.address .recipient {
     font-size: 12px;
+    margin-left: 350px;
+    margin-right: 120px;
+    float: right;
 }
 
+.nobreak {
+     page-break-inside: avoid;
+ }
+
+.align_top {
+     vertical-align:text-top;
+ }
+
     </style>
 </head>
 <body>
@@ -197,86 +253,65 @@
 
     <table class="list_main_table" width="100%">
       <thead>
-        <tr>
-          <th class="list_main_headers" style="width: 100%">
-            <table style="width:100%">
-              <tr>
-                <th class="main_col1">${_("Description")}</th>
-                <th class="amount main_col2">${_("Quantity")}</th>
-                <th class="amount main_col3">${_("UoM")}</th>
-                <th class="amount main_col4">${_("Unit Price")}</th>
-                <th class="main_col5">${_("VAT")}</th>
-                %if show_discount(user.id):
-                <th class="amount main_col6">${_("Disc.(%)")}</th>
-                %endif
-                <th class="amount main_col7">${_("Price")}</th>
-              </tr>
-            </table>
-          </th>
-        </tr>
+          <tr>
+            <th class="main_col1">${_("Description")}</th>
+            <th class="amount main_col2">${_("Quantity")}</th>
+            <th class="amount main_col3">${_("UoM")}</th>
+            <th class="amount main_col4">${_("Unit Price")}</th>
+            <th class="main_col5">${_("VAT")}</th>
+            %if show_discount(user.id):
+            <th class="amount main_col6">${_("Disc.(%)")}</th>
+            %endif
+            <th class="amount main_col7">${_("Price")}</th>
+          </tr>
       </thead>
       <tbody>
         %for line in order.order_line:
           <tr>
-            <td class="list_main_lines" style="width: 100%">
-              <div class="nobreak">
-                <table style="width:100%">
-                  <tr>
-                    <td class="main_col1">${ line.name }</td>
-                    <td class="amount main_col2">${ formatLang(line.product_uos and line.product_uos_qty or line.product_uom_qty) }</td>
-                    <td class="amount main_col3">${ line.product_uos and line.product_uos.name or line.product_uom.name }</td>
-                    <td class="amount main_col4">${formatLang(line.price_unit)}</td>
-                    <td class="main_col5">${ ', '.join([tax.description or tax.name for tax in line.tax_id]) }</td>
-                    %if show_discount(user.id):
-                    <td class="amount main_col6">${line.discount and formatLang(line.discount, digits=get_digits(dp='Sale Price')) or ''} ${line.discount and '%' or ''}</td>
-                    %endif
-                    <td class="amount main_col7">${formatLang(line.price_subtotal, digits=get_digits(dp='Sale Price'))}&nbsp;${order.pricelist_id.currency_id.symbol}</td>
-                  </tr>
-                  %if line.formatted_note:
-                    <caption class="formatted_note">
-                      ${line.formatted_note| n}
-                    </caption>
-                  %endif
-                </table>
-              </div>
+            <td class="align_top"><div class="nobreak">${line.name.replace('\n','<br/>') or '' | n}
+                 %if line.formatted_note:
+                 <br />
+                 <div class="formatted_note">${line.formatted_note| n}</div>
+                 %endif
+                 </div>
             </td>
+            <td class="amount main_col2 align_top">${ formatLang(line.product_uos and line.product_uos_qty or line.product_uom_qty) }</td>
+            <td class="amount main_col3 align_top">${ line.product_uos and line.product_uos.name or line.product_uom.name }</td>
+            <td class="amount main_col4 align_top">${formatLang(line.price_unit)}</td>
+            <td class="main_col5 align_top">${ ', '.join([tax.description or tax.name for tax in line.tax_id]) }</td>
+            %if show_discount(user.id):
+            <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>
+            %endif
+            <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>
           </tr>
         %endfor
       </tbody>
       <tfoot class="totals">
         <tr>
-          <td class="list_main_footers" style="width: 100%">
-            <div class="nobreak">
-              <table style="width:100%">
-                <tr>
-                  <td class="total_empty_cell"/>
-                  <th>
-                    ${_("Net Total:")}
-                  </th>
-                  <td class="amount total_sum_cell">
-                    ${formatLang(order.amount_untaxed, get_digits(dp='Sale Price'))} ${order.pricelist_id.currency_id.symbol}
-                  </td>
-                </tr>
-                <tr>
-                  <td class="total_empty_cell"/>
-                  <th>
-                    ${_("Taxes:")}
-                  </th>
-                  <td class="amount total_sum_cell">
-                    ${formatLang(order.amount_tax, get_digits(dp='Sale Price'))} ${order.pricelist_id.currency_id.symbol}
-                  </td>
-                </tr>
-                <tr>
-                  <td class="total_empty_cell"/>
-                  <th>
-                    ${_("Total:")}
-                  </th>
-                  <td class="amount total_sum_cell">
-                    <b>${formatLang(order.amount_total, get_digits(dp='Sale Price'))} ${order.pricelist_id.currency_id.symbol}</b>
-                  </td>
-                </tr>
-              </table>
-            </div>
+          <td colspan="4" class="total_empty_cell"/>
+          <td style="font-weight:bold">
+            ${_("Net Total:")}
+          </td>
+          <td class="amount total_sum_cell">
+            ${formatLang(order.amount_untaxed, get_digits(dp='Sale Price'))} ${order.pricelist_id.currency_id.symbol}
+          </td>
+        </tr>
+        <tr>
+          <td colspan="4" class="total_empty_cell"/>
+          <td style="font-weight:bold">
+            ${_("Taxes:")}
+          </td>
+          <td class="amount total_sum_cell">
+            ${formatLang(order.amount_tax, get_digits(dp='Sale Price'))} ${order.pricelist_id.currency_id.symbol}
+          </td>
+        </tr>
+        <tr>
+          <td colspan="4" class="total_empty_cell"/>
+          <td style="font-weight:bold">
+            ${_("Total:")}
+          </td>
+          <td class="amount total_sum_cell">
+            <b>${formatLang(order.amount_total, get_digits(dp='Sale Price'))} ${order.pricelist_id.currency_id.symbol}</b>
           </td>
         </tr>
       </tfoot>

-- 
Mailing list: https://launchpad.net/~openerp-community-reviewer
Post to     : openerp-community-reviewer@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openerp-community-reviewer
More help   : https://help.launchpad.net/ListHelp

Reply via email to