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
- Contabilidad
- Inventario
- PoS
- Project
- MRP
Se marcó esta pregunta
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
¿Le interesa esta conversación? ¡Participe en ella!
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
Inscribirse