콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
2464 화면

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?

아바타
취소
베스트 답변

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.

Very good catch Bole! Upvoted :)