Skip to Content
Menu
This question has been flagged
2309 Views

hello evryone;

i want to disply the id location.

this is my code:

pos.xml

<?xml version="1.0" encoding="UTF-8"?>

<templates id="template" xml:space="preserve">

<t t-extend="Product">

<t t-jquery=".product-img" t-operation="append">

<ul class="list">

<t t-foreach="product.locations" t-as="location">

    <li class="list_item" t-att-data-location-id="location[2]">

    <t t-esc="location[0]"/>:<t t-esc="location[1]"/>

</li>

</t>

</ul>

</t>

</t>

<t t-extend="Orderline">

<t t-jquery=".info-list>t:first-child">

this.attr('t-if', "line.get_quantity_str() !== '1' || line.selected || line.get_product().qty_available lt line.quantity ");

</t>

<t t-jquery="t[t-esc='line.get_quantity_str()']" t-operation="after">

<t t-set='qty_available' t-value='line.get_product().qty_available'/>

(of <span t-attf-class="qty-info #{qty_available lt line.quantity ? 'not-available':''}"><t t-esc="qty_available"/></span>)

</t>

</t>

</templates>

pos.js:


refresh_qty_available:function(product,location_id){

var $elem = $("t-att-data-location-id='"+location_id.id+"'] .list");

console.log("$elem",$elem);

},

Avatar
Discard