Skip to content

Commit

Permalink
[MIG] l10n_ar_website_sale_ux: Migration to 17.0
Browse files Browse the repository at this point in the history
closes #271

Signed-off-by: Katherine Zaoral <kz@adhoc.com.ar>
  • Loading branch information
lef-adhoc committed Mar 11, 2024
1 parent 642b3f8 commit 6c1ecac
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion l10n_ar_website_sale_ux/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
l10n_ar Website Sale UX
=======================

#. This module adds a "(+ tax)" legend next to the product price on the ecommerce product and product_item views for b2b customers
#. This module adds a "(+ tax)" legend next to the product price on the ecommerce product and product_item views for b2b customers.
#. This module also hides the tax discrimination line on the cart checkout page for b2c customers.

Installation
Expand Down
4 changes: 2 additions & 2 deletions l10n_ar_website_sale_ux/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
{
'name': 'l10n_ar Website Sale UX',
'category': 'base.module_category_knowledge_management',
'version': "16.0.1.0.0",
'version': "17.0.1.0.0",
'author': 'ADHOC SA',
'website': 'www.adhoc.com.ar',
'license': 'AGPL-3',
Expand All @@ -32,5 +32,5 @@
'views/l10n_ar_website_sale_ux.xml',
'views/l10n_ar_website_sale_hide_taxes.xml',
],
'installable': False,
'installable': True,
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<odoo>
<template id="website_sale_hide_taxes" name="Hide Taxes" inherit_id="website_sale.total">
<xpath expr="//tr[@id='order_total_untaxed']//span" position="attributes">
<attribute name="groups">account.group_show_line_subtotals_tax_excluded</attribute>
<attribute name="t-if">request.env['website'].browse(website.id).show_line_subtotals_tax_selection == 'tax_excluded'</attribute>
<attribute name="t-field">website_sale_order.amount_untaxed</attribute>
</xpath>
<xpath expr="//tr[@id='order_total_untaxed']//span" position="after">
<span t-field="website_sale_order.amount_total" groups="account.group_show_line_subtotals_tax_included" class="monetary_field" style="white-space: nowrap;" t-options="{'widget': 'monetary', 'display_currency': website_sale_order.currency_id}"/>
<span t-field="website_sale_order.amount_total" t-if="request.env['website'].browse(website.id).show_line_subtotals_tax_selection == 'tax_included'" class="monetary_field" style="white-space: nowrap;" t-options="{'widget': 'monetary', 'display_currency': website_sale_order.currency_id}"/>
</xpath>
<tr id='order_total_taxes' position="attributes">
<attribute name="groups">account.group_show_line_subtotals_tax_excluded</attribute>
<attribute name="t-if">request.env['website'].browse(website.id).show_line_subtotals_tax_selection == 'tax_excluded'</attribute>
</tr>
</template>
</odoo>
4 changes: 2 additions & 2 deletions l10n_ar_website_sale_ux/views/l10n_ar_website_sale_ux.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<odoo>
<template id="product_tax" name="Product Tax" inherit_id="website_sale.product_price">
<xpath expr="//span[hasclass('oe_price')]" position="after">
<t t-set='vat_tax' groups="account.group_show_line_subtotals_tax_excluded" t-value='product.sudo().taxes_id.filtered(lambda x: x.company_id == website.company_id and x.tax_group_id.l10n_ar_vat_afip_code)'/>
<t t-set='vat_tax' t-if="request.env['website'].browse(website.id).show_line_subtotals_tax_selection == 'tax_excluded'" t-value='product.sudo().taxes_id.filtered(lambda x: x.company_id == website.company_id and x.tax_group_id.l10n_ar_vat_afip_code)'/>
<span style="white-space: nowrap; font-size:medium; padding-left: 10px" t-if="vat_tax" t-esc="'(+' + vat_tax.name + ')'" />
</xpath>
</template>

<template id="products_item" name="Products item" inherit_id="website_sale.products_item">
<xpath expr="//div[hasclass('product_price')]" position="inside">
<t t-set='vat_tax' groups="account.group_show_line_subtotals_tax_excluded" t-value='product.sudo().taxes_id.filtered(lambda x: x.company_id == website.company_id and x.tax_group_id.l10n_ar_vat_afip_code)'/>
<t t-set='vat_tax' t-if="request.env['website'].browse(website.id).show_line_subtotals_tax_selection == 'tax_excluded'" t-value='product.sudo().taxes_id.filtered(lambda x: x.company_id == website.company_id and x.tax_group_id.l10n_ar_vat_afip_code)'/>
<span style="white-space: nowrap; padding-left: 5px; font-size: 85%;" t-if="vat_tax" t-esc="'(+' + vat_tax.name + ')'" />
</xpath>
</template>
Expand Down

0 comments on commit 6c1ecac

Please sign in to comment.