|
@ -24,8 +24,6 @@ class account_invoice(models.Model): |
|
|
def create_user(self, partner): |
|
|
def create_user(self, partner): |
|
|
user_obj = self.env['res.users'] |
|
|
user_obj = self.env['res.users'] |
|
|
email = partner.email |
|
|
email = partner.email |
|
|
if partner.is_company: |
|
|
|
|
|
email = partner.company_email |
|
|
|
|
|
|
|
|
|
|
|
user = user_obj.search([('login', '=', email)]) |
|
|
user = user_obj.search([('login', '=', email)]) |
|
|
if not user: |
|
|
if not user: |
|
|