コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
3667 ビュー

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) 

アバター
破棄
最善の回答

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

アバター
破棄
著作者

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 :)

最善の回答

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.


アバター
破棄
関連投稿 返信 ビュー 活動
0
9月 22
2135
2
9月 24
3186
1
11月 23
3181
2
2月 22
1489
3
7月 25
6674