I crate contact web form. I want to get data in backend models. I mean this form data is manyto one . How to I get it.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Boekhouding
- Voorraad
- PoS
- Project
- MRP
Deze vraag is gerapporteerd
Hi,
First, initialise a route
controller.py
@http.route('/web/redirect', type='http', auth="user")
def function_name(self, job, **kwargs):
country = request.env['res.country'].sudo().search([])
return request.render("external-id of template", {
'country': country,
})
XML:
<label style="width: 200px" for="country">
<span class="s_website_form_label_content">Country </span>
</label>
<div class="col-sm">
<select id="country"
name="country_id"
class="form-control s_website_form_input">
<option value="">Country</option>
<t t-foreach="country" t-as="country">
<option t-esc="country.name" t-att-value="country.id"/> </t>
</select>
</div>
Regards
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!
Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!
Aanmelden