Odoo Help


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.


Country list on registration form

on 12/13/14, 10:00 AM 988 views

I wish to put res.country on the registration form, so whoever registers on my site selects what country they are from. 

How can i list all the countries in `res.country`? 

Links for adding code to controller https://github.com/odoo/odoo/blob/8.0/addons/website_sale/controllers/main.py#L367 link for adding code to xml https://github.com/odoo/odoo/blob/8.0/addons/website_sale/views/templates.xml#L888 Sorry due to low karma I couldn't answer you properly, but this will help you.

Devang Pipaliya
on 7/30/15, 5:10 AM
Devang Pipaliya
On 12/18/14, 7:28 AM

@Adrian Is this about Website Builder Module? Still you can try by using many2one relation in your registration Model.

Hi Adrian, Updating my answer .. add this code to xml of your registration part of your website reference is here

And this code to your controller reference is here def checkout_values(self, data=None): cr, uid, context, registry = request.cr, request.uid, request.context, request.registry orm_partner = registry.get('res.partner') orm_user = registry.get('res.users') ........ return values
Devang Pipaliya
on 7/30/15, 5:07 AM

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)


Asked: 12/13/14, 10:00 AM
Seen: 988 times
Last updated: 7/30/15, 5:10 AM