|
@ -270,11 +270,12 @@ class subscription_request(models.Model): |
|
|
user = user_obj.search([('login','=',email)]) |
|
|
user = user_obj.search([('login','=',email)]) |
|
|
if not user: |
|
|
if not user: |
|
|
user_values = {'partner_id': partner.id,'login':email} |
|
|
user_values = {'partner_id': partner.id,'login':email} |
|
|
|
|
|
|
|
|
user_id = user_obj.sudo()._signup_create_user(user_values) |
|
|
user_id = user_obj.sudo()._signup_create_user(user_values) |
|
|
user = user_obj.browse(user_id) |
|
|
user = user_obj.browse(user_id) |
|
|
user.sudo().with_context({'create_user': True}).action_reset_password() |
|
|
user.sudo().with_context({'create_user': True}).action_reset_password() |
|
|
|
|
|
|
|
|
|
|
|
return True |
|
|
|
|
|
|
|
|
@api.one |
|
|
@api.one |
|
|
def validate_subscription_request(self): |
|
|
def validate_subscription_request(self): |
|
|
partner_obj = self.env['res.partner'] |
|
|
partner_obj = self.env['res.partner'] |
|
|