From 91d247e89ef6ba0c3ea694c5b9c1e76b4081ba3c Mon Sep 17 00:00:00 2001 From: SHEREEF PT Date: Sat, 17 Jun 2017 10:55:09 +0530 Subject: [PATCH] [CHNG] User Check Issue Fixed --- user_creation_from_employee/__manifest__.py | 2 +- .../user_creation_from_employee.py | 10 ++--- .../user_creation_from_employee.py~ | 43 ------------------- .../user_creation_from_employee_view.xml | 4 +- .../user_creation_from_employee_view.xml~ | 24 ----------- 5 files changed, 8 insertions(+), 75 deletions(-) delete mode 100644 user_creation_from_employee/user_creation_from_employee.py~ delete mode 100644 user_creation_from_employee/user_creation_from_employee_view.xml~ diff --git a/user_creation_from_employee/__manifest__.py b/user_creation_from_employee/__manifest__.py index 33ee2c8cd..90cc1e173 100644 --- a/user_creation_from_employee/__manifest__.py +++ b/user_creation_from_employee/__manifest__.py @@ -22,7 +22,7 @@ ############################################################################## { 'name': 'User From Employee', - 'version': '10.0.1.0.1', + 'version': '10.0.2.0.0', 'summary': 'This module automatically creates User while creating Employee', 'description': 'This module helps you to create user automatically from employees', 'category': 'Human Resources', diff --git a/user_creation_from_employee/user_creation_from_employee.py b/user_creation_from_employee/user_creation_from_employee.py index b819268d6..1a2b676f4 100644 --- a/user_creation_from_employee/user_creation_from_employee.py +++ b/user_creation_from_employee/user_creation_from_employee.py @@ -26,18 +26,18 @@ from odoo import models, fields, api, _ class ResUsersInherit(models.Model): _inherit = 'hr.employee' - user_check = fields.Boolean(default=False) + user_check_tick = fields.Boolean(default=False) @api.multi def create_user(self): user_id = self.env['res.users'].create({'name': self.name,'login': self.work_email}) self.address_home_id = user_id.partner_id.id - self.user_check = True + self.user_check_tick = True @api.onchange('address_home_id') - def user_check(self): + def user_check_tick(self): if self.address_home_id: - self.user_check = True + self.user_check_tick = True else: - self.user_check = False + self.user_check_tick = False diff --git a/user_creation_from_employee/user_creation_from_employee.py~ b/user_creation_from_employee/user_creation_from_employee.py~ deleted file mode 100644 index 29d6fc041..000000000 --- a/user_creation_from_employee/user_creation_from_employee.py~ +++ /dev/null @@ -1,43 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Cybrosys Technologies Pvt. Ltd. -# Copyright (C) 2017-TODAY Cybrosys Technologies(). -# Author: Nilmar Shereef() -# you can modify it under the terms of the GNU LESSER -# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. -# -# It is forbidden to publish, distribute, sublicense, or sell copies -# of the Software or modified copies of the Software. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. -# -# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE -# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. -# If not, see . -# -############################################################################## -from odoo import models, fields, api, _ - - -class ResUsersInherit(models.Model): - _inherit = 'hr.employee' - - user_check1 = fields.Boolean(default=False) - - @api.multi - def create_user(self): - user_id = self.env['res.users'].create({'name': self.name,'login': self.work_email}) - self.address_home_id = user_id.partner_id.id - self.user_check1 = True - - @api.onchange('address_home_id') - def user_check(self): - if self.address_home_id: - self.user_check1 = True - else: - self.user_check1 = False - diff --git a/user_creation_from_employee/user_creation_from_employee_view.xml b/user_creation_from_employee/user_creation_from_employee_view.xml index a84894fed..7c896f192 100644 --- a/user_creation_from_employee/user_creation_from_employee_view.xml +++ b/user_creation_from_employee/user_creation_from_employee_view.xml @@ -7,12 +7,12 @@ - +
diff --git a/user_creation_from_employee/user_creation_from_employee_view.xml~ b/user_creation_from_employee/user_creation_from_employee_view.xml~ deleted file mode 100644 index c48d926f6..000000000 --- a/user_creation_from_employee/user_creation_from_employee_view.xml~ +++ /dev/null @@ -1,24 +0,0 @@ - - - - - hr.employee.form - hr.employee - - - - - - -
-
-
- - 1 - -
-
-
-