[IMP] website_quote: print options on report_saleorder

This commit is contained in:
sha-odoo
2015-04-22 16:41:49 +02:00
committed by Richard Mathot
parent 75f0dc7e68
commit 6de4eb04b3
3 changed files with 45 additions and 2 deletions
+1 -1
View File
@@ -127,7 +127,7 @@
<p t-if="not doc.payment_term and doc.partner_id.property_payment_term">
<span t-field="doc.partner_id.property_payment_term.note"/>
</p>
<p t-if="doc.fiscal_position and doc.fiscal_position.note">
<p id="fiscal_position_remark" t-if="doc.fiscal_position and doc.fiscal_position.note">
<strong>Fiscal Position Remark:</strong>
<span t-field="doc.fiscal_position.note"/>
</p>
@@ -8,6 +8,49 @@
<p t-field="doc.validity_date"/>
</div>
</xpath>
<xpath expr="//div[@class='page']/p[@id='fiscal_position_remark']" position="after">
<div t-if="doc.options and doc.state in ['draft', 'sent']">
<h2>
<span>Suggested Products</span>
</h2>
<table class="table table-condensed">
<thead>
<tr>
<th>Product</th>
<th>Description</th>
<th groups="sale.group_discount_per_so_line"></th>
<th class="text-right">Unit Price</th>
</tr>
</thead>
<tbody class="sale_tbody">
<tr t-foreach="doc.options" t-as="option">
<td>
<span t-field="option.product_id.name"/>
</td>
<td>
<span t-field="option.name"/>
</td>
<td groups="sale.group_discount_per_so_line">
<strong class="text-info">
<t t-esc="((option.discount % 1) and '%s' or '%d') % option.discount"/>% discount
</strong>
</td>
<td>
<strong class="text-right">
<div t-field="option.price_unit"
t-field-options='{"widget": "monetary", "display_currency": "doc.pricelist_id.currency_id"}'
t-att-style="option.discount and 'text-decoration: line-through' or ''"
t-att-class="option.discount and 'text-danger' or ''"/>
<div t-if="option.discount">
<t t-esc="'%.2f' % ((1-option.discount / 100.0) * option.price_unit)"/>
</div>
</strong>
</td>
</tr>
</tbody>
</table>
</div>
</xpath>
</template>
</data>
</openerp>
@@ -446,7 +446,7 @@
<template id="optional_products">
<section t-if="quotation.options" id="options">
<h1 class="page-header">Options</h1>
<h1 class="page-header">Suggested Products</h1>
<table class="table table-hover">
<thead>
<tr>