FoodcoopBCN/foodcoopbcn#162 add website_sale_cart_line_subtotal
This commit is contained in:
parent
90a0e989c8
commit
51a53f54ba
4 changed files with 96 additions and 0 deletions
|
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
|
||||
<!-- Add Line Subtotal column to cart -->
|
||||
<template id="cart_lines_subtotal" inherit_id="website_sale.cart_lines">
|
||||
<!-- Add header for subtotal column -->
|
||||
<xpath expr="//thead/tr/th[@class='text-center td-price']" position="after">
|
||||
<th class="text-center td-subtotal">Subtotal</th>
|
||||
</xpath>
|
||||
|
||||
<!-- Add subtotal value for each line -->
|
||||
<xpath expr="//tbody//tr/td[@name='price']" position="after">
|
||||
<td class="text-center td-subtotal" name="line_subtotal">
|
||||
<t groups="account.group_show_line_subtotals_tax_excluded">
|
||||
<span
|
||||
t-esc="line.price_subtotal"
|
||||
style="white-space: nowrap;"
|
||||
t-options="{'widget': 'monetary', 'display_currency': website_sale_order.currency_id}"
|
||||
/>
|
||||
</t>
|
||||
<t groups="account.group_show_line_subtotals_tax_included">
|
||||
<span
|
||||
t-esc="line.price_total"
|
||||
style="white-space: nowrap;"
|
||||
t-options="{'widget': 'monetary', 'display_currency': website_sale_order.currency_id}"
|
||||
/>
|
||||
</t>
|
||||
</td>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
Loading…
Add table
Add a link
Reference in a new issue