[IMP] account/sale/sale_layout: standardization of Quotation/Sale Order/Invoice printed layout + add missing information

- Column alignment and order are now uniform across those reports.
- Display Due date on invoices.
- Display payment term and fiscal positions notes.
This commit is contained in:
Rucha Dave
2014-12-16 14:23:01 +01:00
committed by Richard Mathot
parent 09cfcac899
commit c85fd5fc86
4 changed files with 40 additions and 30 deletions
+14 -11
View File
@@ -32,6 +32,10 @@
<strong>Invoice Date:</strong>
<p t-field="o.date_invoice"/>
</div>
<div class="col-xs-2" t-if="o.date_due and o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')">
<strong>Due Date:</strong>
<p t-field="o.date_due"/>
</div>
<div class="col-xs-2" t-if="o.origin">
<strong>Source:</strong>
<p t-field="o.origin"/>
@@ -50,17 +54,17 @@
<thead>
<tr>
<th>Description</th>
<th>Quantity</th>
<th class="text-right">Quantity</th>
<th class="text-right">Unit Price</th>
<th class="text-right" groups="sale.group_discount_per_so_line">Discount (%)</th>
<th class="text-right">Taxes</th>
<th class="text-right">Amount</th>
<th groups="sale.group_discount_per_so_line">Disc.(%)</th>
<th>Taxes</th>
<th class="text-right">Price</th>
</tr>
</thead>
<tbody class="invoice_tbody">
<tr t-foreach="o.invoice_line" t-as="l">
<td><span t-field="l.name"/></td>
<td>
<td class="text-right">
<span t-field="l.quantity"/>
<span t-field="l.uos_id" groups="product.group_uom"/>
</td>
@@ -68,7 +72,7 @@
<span t-field="l.price_unit"/>
</td>
<td groups="sale.group_discount_per_so_line"><span t-field="l.discount"/></td>
<td class="text-right">
<td>
<span t-esc="', '.join(map(lambda x: x.name, l.invoice_line_tax_id))"/>
</td>
<td class="text-right">
@@ -135,13 +139,12 @@
<strong>Comment:</strong>
<span t-field="o.comment"/>
</p>
<p t-if="o.payment_term.note">
<strong>Payment Term:</strong>
<p t-if="o.payment_term">
<span t-field="o.payment_term.note"/>
</p>
<p t-if="o.fiscal_position">
<strong>Fiscal Position:</strong>
<span t-field="o.fiscal_position"/>
<p t-if="o.fiscal_position and o.fiscal_position.note">
<strong>Fiscal Position Remark:</strong>
<span t-field="o.fiscal_position.note"/>
</p>
</div>
</t>
+13 -7
View File
@@ -47,7 +47,7 @@
</div>
<div t-if="o.payment_term" class="col-xs-3">
<strong>Payment Term:</strong>
<p t-field="o.payment_term"/>
<p t-field="o.payment_term.name"/>
</div>
</div>
@@ -55,10 +55,10 @@
<thead>
<tr>
<th>Description</th>
<th>Taxes</th>
<th class="text-right">Quantity</th>
<th class="text-right">Unit Price</th>
<th groups="sale.group_discount_per_so_line">Disc.(%)</th>
<th>Taxes</th>
<th class="text-right">Price</th>
</tr>
</thead>
@@ -67,9 +67,6 @@
<td>
<span t-field="l.name"/>
</td>
<td>
<span t-esc="', '.join(map(lambda x: x.name, l.tax_id))"/>
</td>
<td class="text-right">
<span t-field="l.product_uom_qty"/>
<span groups="product.group_uom" t-field="l.product_uom"/>
@@ -80,6 +77,9 @@
<td groups="sale.group_discount_per_so_line">
<span t-field="l.discount"/>
</td>
<td>
<span t-esc="', '.join(map(lambda x: x.name, l.tax_id))"/>
</td>
<td class="text-right">
<span t-field="l.price_subtotal"
t-field-options='{"widget": "monetary", "display_currency": "o.pricelist_id.currency_id"}'/>
@@ -118,8 +118,14 @@
<p t-field="o.note" />
<p t-if="o.payment_term">
<strong>Payment Term:</strong>
<span t-field="o.payment_term"/>
<span t-field="o.payment_term.note"/>
</p>
<p t-if="not o.payment_term and o.partner_id.property_payment_term">
<span t-field="o.partner_id.property_payment_term.note"/>
</p>
<p t-if="o.fiscal_position and o.fiscal_position.note">
<strong>Fiscal Position Remark:</strong>
<span t-field="o.fiscal_position.note"/>
</p>
<div class="oe_structure"/>
</div>
@@ -11,13 +11,15 @@
<t t-foreach="p['lines']" t-as="l">
<tr>
<td><span t-field="l.name"/></td>
<td><span t-field="l.quantity"/></td>
<td groups="product.group_uom"><span t-field="l.uos_id"/></td>
<td class="text-right">
<span t-field="l.quantity"/>
<span t-field="l.uos_id" groups="product.group_uom"/>
</td>
<td class="text-right">
<span t-field="l.price_unit"/>
</td>
<td groups="sale.group_discount_per_so_line"><span t-field="l.discount"/></td>
<td class="text-right">
<td>
<span t-esc="', '.join(map(lambda x: x.name, l.invoice_line_tax_id))"/>
</td>
<td class="text-right">
@@ -45,12 +47,11 @@
<thead>
<tr>
<th>Description</th>
<th>Quantity</th>
<th groups="product.group_uom">Unit of measure</th>
<th class="text-right">Quantity</th>
<th class="text-right">Unit Price</th>
<th class="text-right" groups="sale.group_discount_per_so_line">Discount (%)</th>
<th class="text-right">Taxes</th>
<th class="text-right">Amount</th>
<th groups="sale.group_discount_per_so_line">Disc.(%)</th>
<th>Taxes</th>
<th class="text-right">Price</th>
</tr>
</thead>
<![CDATA[
@@ -13,9 +13,6 @@
<td>
<span t-field="l.name"/>
</td>
<td>
<span t-esc="', '.join(map(lambda x: x.name, l.tax_id))"/>
</td>
<td class="text-right">
<span t-field="l.product_uom_qty"/>
<span groups="product.group_uom" t-field="l.product_uom"/>
@@ -26,6 +23,9 @@
<td groups="sale.group_discount_per_so_line">
<span t-field="l.discount"/>
</td>
<td>
<span t-esc="', '.join(map(lambda x: x.name, l.tax_id))"/>
</td>
<td class="text-right">
<span t-field="l.price_subtotal"
t-field-options='{"widget": "monetary", "display_currency": "o.pricelist_id.currency_id"}'/>
@@ -51,10 +51,10 @@
<thead>
<tr>
<th>Description</th>
<th>Taxes</th>
<th class="text-right">Quantity</th>
<th class="text-right">Unit Price</th>
<th groups="sale.group_discount_per_so_line">Disc.(%)</th>
<th>Taxes</th>
<th class="text-right">Price</th>
</tr>
</thead>