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
- Kế toán
- Tồn kho
- PoS
- Dự án
- MRP
Câu hỏi này đã bị gắn cờ
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
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng ký