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
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
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
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up