/
l10n_ar_sale_templates.xml
50 lines (40 loc) · 2.65 KB
/
l10n_ar_sale_templates.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<odoo>
<template id="sale_order_portal_content" inherit_id="sale.sale_order_portal_content" name="Sales Order">
<t t-set="current_subtotal" t-value="current_subtotal + line.price_subtotal" position="attributes">
<attribute name="t-value">current_subtotal + line.report_price_subtotal</attribute>
</t>
<t t-set="current_subtotal" t-value="current_subtotal + line.price_total" position="attributes">
<attribute name="t-value">current_subtotal + line.report_price_subtotal</attribute>
</t>
<xpath expr="//div[@t-field='line.price_unit']" position="attributes">
<attribute name="t-field">line.report_price_unit</attribute>
</xpath>
<xpath expr="//span[@t-field='line.price_subtotal']" position="attributes">
<attribute name="t-field">line.report_price_subtotal</attribute>
</xpath>
<span groups="account.group_show_line_subtotals_tax_included" position="replace">
<span groups="account.group_show_line_subtotals_tax_included">Amount</span>
</span>
<xpath expr="//span[@t-field='line.price_total']" position="attributes">
<attribute name="t-field">line.report_price_subtotal</attribute>
</xpath>
<xpath expr="//span[contains(@t-out, 'line.tax_id')]" position="attributes">
<attribute name="t-out">', '.join(map(lambda x: (x.description or x.name), line.report_tax_id))</attribute>
</xpath>
<!-- use column vat instead of taxes and only if vat discriminated -->
<th t-attf-class="text-end {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}" position="replace">
<th t-if="sale_order.vat_discriminated" t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}"><span>% VAT</span></th>
</th>
<!-- use column vat instead of taxes and only list vat taxes-->
<td t-attf-class="text-end {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}" position="replace">
<td t-if="sale_order.vat_discriminated" t-attf-class="text-right {{ 'd-none d-md-table-cell' if report_type == 'html' else '' }}">
<span t-out="', '.join(map(lambda x: (x.description or x.name), line.tax_id.filtered(lambda x: x.tax_group_id.l10n_ar_vat_afip_code)))"/>
</td>
</td>
</template>
<template id="document_tax_totals" inherit_id="account.document_tax_totals" name="document_tax_totals" primary="True">
<xpath expr="//t[@t-foreach]" position="attributes">
<attribute name="t-if">not doc._l10n_ar_include_vat()</attribute>
</xpath>
</template>
</odoo>