[FIX] website_sale_option: update product qty

When there is no user logged in the website, the product id must be written
in the DOM.

opw: 634535
This commit is contained in:
Goffin Simon 2015-05-18 12:31:17 +02:00
parent f6c65a3d9e
commit 1c90b9049b
2 changed files with 2 additions and 1 deletions

View File

@ -65,7 +65,7 @@ $(document).ready(function () {
});
$modal.on("change", 'input[name="add_qty"]', function (event) {
var product_id = $($modal.find('span.oe_price[data-oe-model="product.product"]').first()).data('oe-id');
var product_id = $($modal.find('span.oe_price[data-product-id]')).first().data('product-id');
var default_price = parseInt($('.text-danger.oe_default_price > span.oe_currency_value').text());
var $dom = $(event.target).closest('tr');
var qty = $dom.find('input[name="add_qty"]').val();

View File

@ -63,6 +63,7 @@
"display_currency": "user_id.partner_id.property_product_pricelist.currency_id"
}'/>
<span class="oe_price" style="white-space: nowrap;"
t-att-data-product-id="product.id"
t-field="product.price"
t-field-options='{
"widget": "monetary",