Hello there,
We are on Odoo 8.
I knew that I had a problem with the currency format in some case on my webshop. This morning, I noticed something...
For all products without variant, the price is well formatted (with a comma) :
But as soon as a product has some variants, the price is NOT well formatted (with a dot instead of the comma...) :
Would you have some ideas to format all my prices correctly in all cases?
Thanks for your comments
EDIT #1
I suspect a problem in the file openerp/addons/website_sale/static/src/js/website_sale.js. I think the javascript is used when a product has some variants.
May be something in this code :
// change price when they are variants
$('form.js_add_cart_json label', oe_website_sale).on('mouseup touchend', function (ev) {
var $label = $(this);
var $price = $label.parents("form:first").find(".oe_price .oe_currency_value");
if (!$price.data("price")) {
$price.data("price", parseFloat($price.text()));
}
var value = $price.data("price") + parseFloat($label.find(".badge span").text() || 0);
var dec = value % 1;
$price.html(value + (dec < 0.01 ? ".00" : (dec < 1 ? "0" : "") ));
});
EDIT #2
Ţhe same thing arrives in the cart. When the customer change the quantity of an ordered item with the - or + buttons, the item price loses his comma for a dot :
Little up here. An idea?