This question has been flagged
1 Reply
6740 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`? 

Avatar
Discard

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.

Best Answer

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

Avatar
Discard

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