Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
6627 มุมมอง

Is it possible to enter the user name to res.partner?plz give me an answer?

อวตาร
ละทิ้ง

just for clarification, you want to automatically create a system user and link it to the regarding employee, when you create a new employee. Am I correct?

คำตอบที่ดีที่สุด

Hello Deepak,

When you create user, system will create the partner automatically by using user's name.

So partner will have same name as user. The reason behind this is that, user (res.users) inherits the partner (res.partner) object.

Hope this will help you.

อวตาร
ละทิ้ง
ผู้เขียน

am creating new module having the user details to add and it is not inheriting from res.partner or any res.user.So for adding my custom user to the res.partner table i need to write a function rite.So can u help me with that..plzz

คำตอบที่ดีที่สุด

Hi Deepak,

I think one option to override the write() in model hr.employee, make the required entries to res.partner in the function and you can set a hidden boolean field in hr.employee to check within the write() whether the entry is already made once, so that it doesn't happen again on editing the record.

อวตาร
ละทิ้ง