Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
3664 Visualizzazioni

you can see the below screenshot .. while am creating a user, it is automatically created a vendor .. after the mail id u can see a related partner field ... I need a solution for that. I need to create a user but not a vendor with the same name. basically am asking, how can I avoid that field? (you can see that feature by enabling the developer mode) 

Avatar
Abbandona
Risposta migliore

Hi,

res.users model is created by inheriting(delegation inheritance) of the res.partner model. So when you create  a new user it will automatically creates a contact in res.partner table.

For more about this:https://www.youtube.com/watch?v=CkUulwB6k3o

Thanks

Avatar
Abbandona
Autore

Hi Niyas,
i understood the inherits part, but the doubt is how can i remove that functionality in my module. i don't want to create a vendor while creating the user. Can you Please write the code structure here ?
Thank you :)

Risposta migliore

Hi Ashutosh,

You can't create a user without a related partner. This is because the User model is an extension of the Partner model.  Basically, when you fill in the user form and click on save, A partner record is first created to hold the general information like the name of the user, profile picture, the user language, email, Tax ID, addresses...and any other general information that will be updated in the future. To confirm this, you can try changing the name of the partner and you will notice that the name of the linked user also changes. 

The user model is dedicated to storing the technical data only like username, password, login history, groups (access rights), etc. Think of the Partner model as the blueprint for the user model.


Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
set 22
2134
2
set 24
3186
1
nov 23
3181
2
feb 22
1489
3
lug 25
6670