Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

add a dropdown in a contact form

By
Coralie Cardon
on 3/3/15, 3:57 AM 904 views

hey,

I would like add a dropdown in my contact form on my web site. but i d'ont know how I should do. 

And how must i do for the dropdown have an impact on my backoffice. for exemple: if i add a dropdown with type of questions. It's could be great if the types of questions sont rangé par type. 

Thanks to help me :) 

0
Sody
On 3/4/15, 4:44 AM

You can create a new dropdownlist with your own values like that:

 

VIEW:

 <option value="">Select country...</option>
       <t t-foreach="countries or []" t-as="country">
       <option t-att-value="country.id" t-att-selected="country.id == account.country_id.id"><t t-esc="country.name"/></option>                          
       </t>

 

CONTROLLER:

 

countries = http.request.env['res.country']

values = {
                'countries': countries.search([]),
         }
         return http.request.render('eq_website_customerportal.accountDetail', values)

 

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 3/3/15, 3:57 AM
Seen: 904 times
Last updated: 11/17/16, 12:55 AM