Skip to Content
Menu
This question has been flagged
893 Views

Hi

I add a many2one field customer to a website page.

I can only choose the customer. I want it to have the ability to search by entering part of the customer name.

please help me, thanks.

Avatar
Discard
Author

<select id="cus" name="customer" class="form-control o_website_form_input" style="border-radius: 1em;max-height:35px; width:420px;float:center;margin:10px" required="1" onchange="check_selected_customer()">
<option selected="selected" value="-1">
<t t-if=" not selected_customer" t-esc="'Select a customer'"/>
</option>
<t t-foreach="customers" t-as="customer">
<option t-att-value="customer">
<t t-esc="customers[customer]"/>
</option>
</t>
</select>