Skip to Content
Menu
This question has been flagged
2 Replies
3584 Views

Hello, this is my first question on this forum, I'm trying to display prices including taxes in the POS product list at the right side of the screen.

I created a custom module for this along with a template which extends the Product template like this:

<?xml version="1.0" encoding="utf-8"?>
<templates xml:space="preserve">
<t t-name="onebarber.product" t-extend="Product">
<t t-jquery=".price-tag" t-operation="replace">
<t t-if="product.taxes_id > 0">
<t t-set="vat" t-value="1 + (widget.pos.taxes_by_id[product.taxes_id[0]]['amount'] / 100)"/>
</t>
<t t-if="product.taxes_id == 0">
<t t-set="vat" t-value="1"/>
</t>
<t t-set="price_with_vat" t-value="widget.format_currency(product.price * vat, 'Product Price')"/>
<t t-if="!product.to_weight">
<span class="price-tag">
<t t-esc="price_with_vat"/>
</span>
</t>
<t t-if="product.to_weight">
<span class="price-tag">
<t t-esc="price_with_vat+'/'+widget.pos.units_by_id[product.uom_id[0]].name"/>
</span>
</t>
</t>
</t>
</templates>

When I put t-debug traces, I can see my code is called and prices are properly displayed in the Javascript debug console. But somehow, the prices at the POS screen are not updated.

Is there something I am missing in order to update the prices?

Avatar
Discard
Author Best Answer

You mean the "Include Taxes in Prices" at the POS Config screen I guess ?
Yes, this option is checked and displays prices with taxes at le left of the screen where products are added to the cart.

I talk about the right side of the screen where you have the list of all available products.
There is a price-tag there which displays prices without vat in my configuration.

The purpose of my module is to display the prices wirth vat in that side of the screen as well.

Avatar
Discard
Best Answer

In POS I think there is already option to see the prices with "Include Taxes in Prices".  Are you talking about this one ? If yes then you can configure this option in POS terminal config.

Avatar
Discard