跳至內容
選單
此問題已被標幟
1 回覆
5748 瀏覽次數

Hi,

I need to create a drop down list of customer in the POS interface, i know we have loaded the customers in the pos and we can select it by click on customer button.But i wish to display customers as a dropdown list.How can i do that?

Thanks

頭像
捨棄
最佳答案

Hi,

Like you said partners are already loaded to POS.You can access those in XML

Try the below code

<select>
<option value=''>None</option>
<t t-foreach='widget.pos.partners' t-as='partner'>
<option t-att-value='partner.id'>
<t t-esc='partner.name'/>
</option>
</t>
</select>

We will get the customers by looping widget.pos.partners. And you can use this in your required position where you need the dropdownlist.

Hope it helps

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
5月 23
137
0
11月 22
2942
2
7月 22
20250
0
3月 19
3402
3
4月 25
1343