[IMP] account,sale,sale_layout,report_intrastat : do not display discount if equal to 0
This commit is contained in:
committed by
Richard Mathot
parent
e66f0eb18e
commit
01b536b3ce
@@ -50,13 +50,16 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Is there a discount on at least one line? -->
|
||||
<t t-set="display_discount" t-value="any([l.discount for l in o.invoice_line])"/>
|
||||
|
||||
<table class="table table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Description</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 t-if="display_discount" groups="sale.group_discount_per_so_line">Disc.(%)</th>
|
||||
<th>Taxes</th>
|
||||
<th class="text-right">Price</th>
|
||||
</tr>
|
||||
@@ -71,7 +74,9 @@
|
||||
<td class="text-right">
|
||||
<span t-field="l.price_unit"/>
|
||||
</td>
|
||||
<td class="text-right" groups="sale.group_discount_per_so_line"><span t-field="l.discount"/></td>
|
||||
<td t-if="display_discount" class="text-right" groups="sale.group_discount_per_so_line">
|
||||
<span t-field="l.discount"/>
|
||||
</td>
|
||||
<td>
|
||||
<span t-esc="', '.join(map(lambda x: x.name, l.invoice_line_tax_id))"/>
|
||||
</td>
|
||||
|
||||
@@ -38,6 +38,9 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Is there a discount on at least one line? -->
|
||||
<t t-set="display_discount" t-value="any([l.discount for l in o.invoice_line])"/>
|
||||
|
||||
<table class="table table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -48,7 +51,7 @@
|
||||
<th class="text-right">Quantity</th>
|
||||
<th groups="product.group_uom">Unit of measure</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" t-if="display_discount" groups="sale.group_discount_per_so_line">Discount (%)</th>
|
||||
<th class="text-right">Amount</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -61,7 +64,7 @@
|
||||
<td class="text-right"><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.price_unit"/></td>
|
||||
<td groups="sale.group_discount_per_so_line"><span t-field="l.discount"/></td>
|
||||
<td t-if="display_discount" groups="sale.group_discount_per_so_line"><span t-field="l.discount"/></td>
|
||||
<td class="text-right">
|
||||
<span t-field="l.price_subtotal"
|
||||
t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
|
||||
|
||||
@@ -52,13 +52,16 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Is there a discount on at least one line? -->
|
||||
<t t-set="display_discount" t-value="any([l.discount for l in doc.order_line])"/>
|
||||
|
||||
<table class="table table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Description</th>
|
||||
<th class="text-right">Quantity</th>
|
||||
<th class="text-right">Unit Price</th>
|
||||
<th class="text-right"><span groups="sale.group_discount_per_so_line">Disc.(%)</span></th>
|
||||
<th t-if="display_discount" class="text-right"><span groups="sale.group_discount_per_so_line">Disc.(%)</span></th>
|
||||
<th class="text-right">Taxes</th>
|
||||
<th class="text-right">Price</th>
|
||||
</tr>
|
||||
@@ -75,7 +78,7 @@
|
||||
<td class="text-right">
|
||||
<span t-field="l.price_unit"/>
|
||||
</td>
|
||||
<td class="text-right" groups="sale.group_discount_per_so_line">
|
||||
<td t-if="display_discount" class="text-right" groups="sale.group_discount_per_so_line">
|
||||
<span t-field="l.discount"/>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
@@ -18,7 +18,9 @@
|
||||
<td class="text-right">
|
||||
<span t-field="l.price_unit"/>
|
||||
</td>
|
||||
<td class="text-right" groups="sale.group_discount_per_so_line"><span t-field="l.discount"/></td>
|
||||
<td t-if="display_discount" class="text-right" groups="sale.group_discount_per_so_line">
|
||||
<span t-field="l.discount"/>
|
||||
</td>
|
||||
<td>
|
||||
<span t-esc="', '.join(map(lambda x: x.name, l.invoice_line_tax_id))"/>
|
||||
</td>
|
||||
@@ -49,7 +51,7 @@
|
||||
<th>Description</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 t-if="display_discount" groups="sale.group_discount_per_so_line">Disc.(%)</th>
|
||||
<th>Taxes</th>
|
||||
<th class="text-right">Price</th>
|
||||
</tr>
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
<td class="text-right">
|
||||
<span t-field="l.price_unit"/>
|
||||
</td>
|
||||
<td>
|
||||
<span groups="sale.group_discount_per_so_line" t-field="l.discount"/>
|
||||
<td t-if="display_discount" class="text-right" 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))"/>
|
||||
@@ -53,8 +53,8 @@
|
||||
<th>Description</th>
|
||||
<th class="text-right">Quantity</th>
|
||||
<th class="text-right">Unit Price</th>
|
||||
<th class="text-right"><!-- keep the column to keep a fix number for colspan -->
|
||||
<span groups="sale.group_discount_per_so_line">Disc.(%)</span>
|
||||
<th t-if="display_discount" groups="sale.group_discount_per_so_line" class="text-right">
|
||||
<span>Disc.(%)</span>
|
||||
</th>
|
||||
<th class="text-right">Taxes</th>
|
||||
<th class="text-right">Price</th>
|
||||
|
||||
Reference in New Issue
Block a user