Hi all, is there a way to create a user from a contact without installing the mail odoo app ? Because I want to have this feature in my odoo integration but I don't want a mail service in it, for example coding something or maybe editing a module.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Akuntansi
- Inventaris
- PoS
- Project
- MRP
Pertanyaan ini telah diberikan tanda
2
Replies
1715
Tampilan
thanks for the help, but im trying this code and its not creating new users i dont know why?
Hi,
If you are familiar with code you can achieve this by over riding the create function of model res.partner, super it and create the user.
class ResPartner(models.Model):
_name = 'res.partner'
_inherit = 'res.partner'
@api.model
def create(self, vals):
res = super(ResPartner, self).create(vals)
for rec in res:
user = self.env[‘res.users’].sudo().create({
‘name’: rec.name,
‘login’: rec.email,
‘partner_id’: rec.id
)}
return res
Regards
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
|
1
Agu 25
|
1740 | ||
|
0
Okt 24
|
1373 | ||
|
0
Nov 23
|
1847 | ||
Sell Price / Price per Weight
Diselesaikan
|
|
1
Agu 22
|
2617 | |
|
0
Agu 22
|
2147 |