Skip to content
Snippets Groups Projects
Commit 93157ebe authored by david's avatar david Committed by Martin Trigaux
Browse files

[IMP] account,sale: add names to columns for better inheritance


closes odoo/odoo#37769

Signed-off-by: default avatarMartin Trigaux (mat) <mat@odoo.com>
parent 8c4c4394
No related branches found
No related tags found
No related merge requests found
......@@ -51,17 +51,17 @@
<tr>
<!-- TODO: remove in master -->
<t t-set="colspan" t-value="6"/>
<th class="text-left"><span>Description</span></th>
<th class="d-none text-left"><span>Source Document</span></th>
<th class="text-right"><span>Quantity</span></th>
<th t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}"><span>Unit Price</span></th>
<th t-if="display_discount" t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
<th name="th_description" class="text-left"><span>Description</span></th>
<th name="th_source" class="d-none text-left"><span>Source Document</span></th>
<th name="th_quantity" class="text-right"><span>Quantity</span></th>
<th name="th_priceunit" t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}"><span>Unit Price</span></th>
<th name="th_price_unit" t-if="display_discount" t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
<span>Disc.%</span>
<!-- TODO: remove in master -->
<t t-set="colspan" t-value="colspan+1"/>
</th>
<th t-attf-class="text-left {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}"><span>Taxes</span></th>
<th class="text-right">
<th name="th_taxes" t-attf-class="text-left {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}"><span>Taxes</span></th>
<th name="th_subtotal" class="text-right">
<span groups="account.group_show_line_subtotals_tax_excluded">Amount</span>
<span groups="account.group_show_line_subtotals_tax_included">Total Price</span>
</th>
......
......@@ -66,14 +66,14 @@
<table class="table table-sm o_main_table">
<thead>
<tr>
<th class="text-left">Description</th>
<th class="text-right">Quantity</th>
<th class="text-right">Unit Price</th>
<th t-if="display_discount" class="text-right" groups="product.group_discount_per_so_line">
<th name="th_description" class="text-left">Description</th>
<th name="th_quantity" class="text-right">Quantity</th>
<th name="th_priceunit" class="text-right">Unit Price</th>
<th name="th_discount" t-if="display_discount" class="text-right" groups="product.group_discount_per_so_line">
<span>Disc.%</span>
</th>
<th class="text-right">Taxes</th>
<th class="text-right">
<th name="th_taxes" class="text-right">Taxes</th>
<th name="th_subtotal" class="text-right">
<t groups="account.group_show_line_subtotals_tax_excluded">Amount</t>
<t groups="account.group_show_line_subtotals_tax_included">Total Price</t>
</th>
......@@ -90,34 +90,34 @@
<tr t-att-class="'bg-200 font-weight-bold o_line_section' if line.display_type == 'line_section' else 'font-italic o_line_note' if line.display_type == 'line_note' else ''">
<t t-if="not line.display_type">
<td><span t-field="line.name"/></td>
<td class="text-right">
<td name="td_name"><span t-field="line.name"/></td>
<td name="td_quantity" class="text-right">
<span t-field="line.product_uom_qty"/>
<span t-field="line.product_uom" groups="uom.group_uom"/>
</td>
<td class="text-right">
<td name="td_priceunit" class="text-right">
<span t-field="line.price_unit"/>
</td>
<td t-if="display_discount" class="text-right" groups="product.group_discount_per_so_line">
<span t-field="line.discount"/>
</td>
<td class="text-right">
<td name="td_taxes" class="text-right">
<span t-esc="', '.join(map(lambda x: (x.description or x.name), line.tax_id))"/>
</td>
<td class="text-right o_price_total">
<td name="td_subtotal" class="text-right o_price_total">
<span t-field="line.price_subtotal" groups="account.group_show_line_subtotals_tax_excluded"/>
<span t-field="line.price_total" groups="account.group_show_line_subtotals_tax_included"/>
</td>
</t>
<t t-if="line.display_type == 'line_section'">
<td colspan="99">
<td name="td_section_line" colspan="99">
<span t-field="line.name"/>
</td>
<t t-set="current_section" t-value="line"/>
<t t-set="current_subtotal" t-value="0"/>
</t>
<t t-if="line.display_type == 'line_note'">
<td colspan="99">
<td name="td_note_line" colspan="99">
<span t-field="line.name"/>
</td>
</t>
......@@ -125,7 +125,7 @@
<t t-if="current_section and (line_last or doc.order_line[line_index+1].display_type == 'line_section')">
<tr class="is-subtotal text-right">
<td colspan="99">
<td name="td_section_subtotal" colspan="99">
<strong class="mr16">Subtotal</strong>
<span
t-esc="current_subtotal"
......@@ -143,28 +143,28 @@
<div t-attf-class="#{'col-4' if report_type != 'html' else 'col-sm-7 col-md-5'} ml-auto">
<table class="table table-sm">
<tr class="border-black o_subtotal" style="">
<td><strong>Subtotal</strong></td>
<td class="text-right">
<td name="td_amount_untaxed_label"><strong>Subtotal</strong></td>
<td name="td_amount_untaxed" class="text-right">
<span t-field="doc.amount_untaxed"/>
</td>
</tr>
<t t-foreach="doc.amount_by_group" t-as="amount_by_group">
<tr style="">
<t t-if="amount_by_group[3] == 1 and doc.amount_untaxed == amount_by_group[2]">
<td>
<td name="td_amount_by_group_label_3">
<span t-esc="amount_by_group[0]"/>
<span>&amp;nbsp;<span>on</span>&amp;nbsp;<t t-esc="amount_by_group[2]" t-options='{"widget": "monetary", "display_currency": doc.pricelist_id.currency_id}'/></span>
</td>
<td class="text-right o_price_total">
<td name="td_amount_by_group_3" class="text-right o_price_total">
<span t-esc="amount_by_group[1]"
t-options='{"widget": "monetary", "display_currency": doc.pricelist_id.currency_id}'/>
</td>
</t>
<t t-else ="">
<td>
<td name="td_amount_by_group_label">
<span t-esc="amount_by_group[0]"/>
</td>
<td class="text-right o_price_total">
<td name="td_amount_by_group" class="text-right o_price_total">
<span t-esc="amount_by_group[1]"
t-options='{"widget": "monetary", "display_currency": doc.pricelist_id.currency_id}'/>
</td>
......@@ -172,8 +172,8 @@
</tr>
</t>
<tr class="border-black o_total">
<td><strong>Total</strong></td>
<td class="text-right">
<td name="td_amount_total_label"><strong>Total</strong></td>
<td name="td_amount_total" class="text-right">
<span t-field="doc.amount_total"/>
</td>
</tr>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment