Odoo Help

0

Why email not showing in sign up form when i install my custom module?

By
samba
on 1/21/15, 5:01 AM 538 views

I have made one custom module to make association between user and vendor. When i install this module in odoo-8, the signup form not  showing "your email" field information, it is blank. I unable to enter email information there, because it is readonly field.

These two are my relations between user and vendor:

class res_partner(osv.osv):
    _inherit="res.partner"
    _columns = {
        'user_ids':fields.one2many('res.users','res_partner_id','Users', readonly=True),
    }
class res_user(osv.osv):
    
    _inherit="res.users"
    _columns = {
        'res_partner_id':fields.many2one('res.partner','Partner'),
    }

Please can any one help me?

2
Bole
On 1/21/15, 9:54 AM

Here you have a small understandig probelm.. res_partner model, already has boolean 'is_user', and res_users already inherits res_partner, and extends it with user tech data , and is m2o related to partner_id No need for extra m2o-o2m relation (specialy not o2m partner-> user!) The only problem is, when you create a new user , it will automaticly create NEW partner. What you need to do, is make a wizard wich will allow to select existing partner before createing actual user, and create associated user for that partner... So on res_partner that record will have company_id of his real company , and related res_users record will have comapny_id of company that he is user of... Hope you got the idea.. this is not simple to understand... Try to examine db data for more info, and do some tests...

Thank you Bole. Working fine. I have removed my custom relation between user and partner. Using existing user and partner relation.

samba
on 1/21/15, 9:56 AM

Very good catch Bole! Upvoted :)

Yenthe
on 1/21/15, 9:58 AM

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

Question tools

1 follower(s)

Stats

Asked: 1/21/15, 5:01 AM
Seen: 538 times
Last updated: 3/16/15, 8:10 AM