Skip to content

Commit

Permalink
Merge pull request #1 from eLBati/7_fix_1331394
Browse files Browse the repository at this point in the history
7 fix 1331394
  • Loading branch information
bwrsandman committed Feb 9, 2015
2 parents f4a26fb + 3607f95 commit 100c8fd
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 97 deletions.
128 changes: 58 additions & 70 deletions purchase_order_webkit/report/purchase_order.mako
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,18 @@ table.list_main_table {
.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_lines td {
border-bottom:thin solid #EEEEEE
}
.list_main_footers td {
border: thin solid #ffffff;
}
.list_main_footers th {
text-align:right;
}
Expand All @@ -56,6 +63,10 @@ td .total_sum_cell {
width: 13%;
}
tfoot.totals tr:first-child td{
padding-top: 15px;
}
.nobreak {
page-break-inside: avoid;
}
Expand Down Expand Up @@ -209,7 +220,6 @@ td.main_col1 {
vertical-align:top;
}
</style>

</head>
Expand Down Expand Up @@ -288,79 +298,57 @@ td.main_col1 {
</table>
<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="main_col2">${_("Taxes")}</th>
<th class="main_col3">${_("Date Req.")}</th>
<th style="text-align:center" class="amount main_col4">${_("Qty")}</th>
<th class="main_col5">${_("UoM")}</th>
<th class="amount main_col6">${_("Unit Price")}</th>
<th class="amount main_col7">${_("Net Price")}</th>
</tr>
</table>
</th>
</tr>
<tr class="list_main_headers">
<th class="main_col1">${_("Description")}</th>
<th class="main_col2">${_("Taxes")}</th>
<th class="main_col3">${_("Date Req.")}</th>
<th style="text-align:center" class="amount main_col4">${_("Qty")}</th>
<th class="main_col5">${_("UoM")}</th>
<th class="amount main_col6">${_("Unit Price")}</th>
<th class="amount main_col7">${_("Net Price")}</th>
</tr>
</thead>
<tbody>
%for line in purch.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.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_col7">${formatLang(line.price_subtotal, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol}</td>
</tr>
</table>
</div>
</td>
</tr>
<tr class="list_main_lines">
<td class="main_col1">${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_col7">${formatLang(line.price_subtotal, digits=get_digits(dp='Purchase Price'))} ${purch.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 :")}
</th>
<td class="amount total_sum_cell">
${formatLang(purch.amount_untaxed, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol}
</td>
</tr>
<tr>
<td class="total_empty_cell"/>
<th>
${_("Taxes:")}
</th>
<td class="amount total_sum_cell">
${formatLang(purch.amount_tax, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol}
</td>
</tr>
<tr>
<td class="total_empty_cell"/>
<th>
${_("Total:")}
</th>
<td class="amount total_sum_cell">
${formatLang(purch.amount_total, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol}
</td>
</tr>
</table>
</div>
</td>
</tr>
<tr class="list_main_footers">
<td colspan="5" class="total_empty_cell"/>
<td style="font-weight:bold; text-align: right">
${_("Net :")}
</td>
<td class="amount total_sum_cell">
${formatLang(purch.amount_untaxed, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol}
</td>
</tr>
<tr class="list_main_footers">
<td colspan="5" class="total_empty_cell"/>
<td style="font-weight:bold; text-align: right">
${_("Taxes:")}
</td>
<td class="amount total_sum_cell">
${formatLang(purch.amount_tax, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol}
</td>
</tr>
<tr class="list_main_footers">
<td colspan="5" class="total_empty_cell"/>
<td style="font-weight:bold; text-align: right">
${_("Total:")}
</td>
<td class="amount total_sum_cell">
${formatLang(purch.amount_total, digits=get_digits(dp='Purchase Price'))} ${purch.pricelist_id.currency_id.symbol}
</td>
</tr>
</tfoot>
</table>
<p style="page-break-after:always"/>
Expand Down
40 changes: 13 additions & 27 deletions purchase_order_webkit/report/request_quotation.mako
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ table.list_main_table {
border-style: none;
text-align:left;
font-size:12;
padding:0;
border-bottom:thin solid #EEEEEE
}
.list_main_footers th {
text-align:right;
Expand Down Expand Up @@ -274,34 +274,20 @@ td.main_col1 {
<h3 style="clear:both; padding-top: 20px;">${_("Request for Quotation:")} ${purch.name}</h3>
<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="main_col3">${_("Expected Date")}</th>
<th style="text-align:center" class="amount main_col4">${_("Qty")}</th>
</tr>
</table>
</th>
</tr>
<tr class="list_main_headers">
<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>
</thead>
<tbody>
<tr>
<td class="list_main_lines" style="width: 100%">
<div class="nobreak">
<table style="width:100%">
%for line in purch.order_line :
<tr class="line">
<td class="main_col1">${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>
</div>
</td>
</tr>
%for line in purch.order_line :
<tr class="line list_main_lines">
<td class="main_col1"><div class="nobreak">${line.name.replace('\n','<br/>') or '' | n}</div></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
</tbody>
</table>

Expand Down

0 comments on commit 100c8fd

Please sign in to comment.