Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
Here i need the following,
1.add country while user signing up in web/signup url.
Here is my code...
<label class="control-label" for="country_id">Country</label>
<select name="country_id" id="country_id" class="form-control">
<t t-foreach="countries or " t-as="country">
<option t-att-value="country.id" t-att-selected="country.id == auth_signup.get('country_id')"><t t-esc="country.name"/></option>
but it not listing the countries list from res.country
please give any ideas / suggestions
thanks in advance...!
I recently came across this problem and found a solution.
Now, the t-att-selected in your xml option will still fail as auth_signup does not have anything with country-id. I'd just remove the t-att-selected.
You'll have to modify the controller 'main.py' of the module auth_signup. Or inherit it (preferred way)
Then add the following code to the top of the method 'web_auth_signup':
orm_country = request.registry.get('res.country')
country_ids = orm_country.search(request.cr, SUPERUSER_ID, , context=request.context)
countries = orm_country.browse(request.cr, SUPERUSER_ID, country_ids, context=request.context)
qcontext = self.get_auth_signup_qcontext() # This line is already present in this method.
qcontext['countries'] = countries
# Paste the rest of the original method here.
Hope my explanation was clear
About This Community
This platform 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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 9/9/15, 1:53 PM|
|Seen: 1820 times|
|Last updated: 11/19/16, 7:54 PM|