diff --git a/employee_creation_from_user/__init__.py b/employee_creation_from_user/__init__.py new file mode 100644 index 000000000..fe5599353 --- /dev/null +++ b/employee_creation_from_user/__init__.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +import employee_creation_from_user \ No newline at end of file diff --git a/employee_creation_from_user/__openerp__.py b/employee_creation_from_user/__openerp__.py new file mode 100644 index 000000000..e7172a141 --- /dev/null +++ b/employee_creation_from_user/__openerp__.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2014-TODAY Cybrosys Technologies(). +# Author: Jesni Banu() +# 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 . +# +############################################################################## +{ + 'name': 'Employees From User', + 'version': '9.0.1.0.1', + 'summary': 'This Module Automatically Create Employees From User', + 'description': 'This module helps you to create employees automatically from user', + 'category': 'Human Resources', + 'author': 'Cybrosys Techno Solutions', + 'website': 'http://www.cybrosys.com', + 'company': 'Cybrosys Techno Solutions', + 'depends': ['base', 'hr'], + 'data': ['employee_creation_from_user_view.xml'], + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/employee_creation_from_user/employee_creation_from_user.py b/employee_creation_from_user/employee_creation_from_user.py new file mode 100644 index 000000000..64c36e182 --- /dev/null +++ b/employee_creation_from_user/employee_creation_from_user.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2014-TODAY Cybrosys Technologies(). +# Author: Jesni Banu() +# 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 openerp import models, fields, api, _ + + +class ResUsersInherit(models.Model): + _inherit = 'res.users' + + employee_id = fields.Many2one('hr.employee', + string='Related Employee', ondelete='restrict', + help='Partner-related data of the user', auto_join=True) + + @api.model + def create(self, vals): + result = super(ResUsersInherit, self).create(vals) + result['employee_id'] = self.env['hr.employee'].create({'name': vals['name'], + 'user_id': result['id'], + 'address_home_id': result['partner_id'].id}) + return result diff --git a/employee_creation_from_user/employee_creation_from_user_view.xml b/employee_creation_from_user/employee_creation_from_user_view.xml new file mode 100644 index 000000000..91bf1f676 --- /dev/null +++ b/employee_creation_from_user/employee_creation_from_user_view.xml @@ -0,0 +1,16 @@ + + + + + res.users.form + res.users + + + + + + + + + \ No newline at end of file diff --git a/employee_creation_from_user/static/description/11.png b/employee_creation_from_user/static/description/11.png new file mode 100644 index 000000000..82defadb2 Binary files /dev/null and b/employee_creation_from_user/static/description/11.png differ diff --git a/employee_creation_from_user/static/description/22.png b/employee_creation_from_user/static/description/22.png new file mode 100644 index 000000000..d67db7a86 Binary files /dev/null and b/employee_creation_from_user/static/description/22.png differ diff --git a/employee_creation_from_user/static/description/banner.jpg b/employee_creation_from_user/static/description/banner.jpg new file mode 100644 index 000000000..917ad52d8 Binary files /dev/null and b/employee_creation_from_user/static/description/banner.jpg differ diff --git a/employee_creation_from_user/static/description/icon.png b/employee_creation_from_user/static/description/icon.png new file mode 100644 index 000000000..2fb2b5746 Binary files /dev/null and b/employee_creation_from_user/static/description/icon.png differ diff --git a/employee_creation_from_user/static/description/index.html b/employee_creation_from_user/static/description/index.html new file mode 100644 index 000000000..758609fc3 --- /dev/null +++ b/employee_creation_from_user/static/description/index.html @@ -0,0 +1,67 @@ +
+
+

Employees From User

+

This Module automatically creating employees from user.

+

Author : Cybrosys Techno Solutions , www.cybrosys.com

+
+
+
+ ♠This Module automatically creating employees from user. +
+
+
+ +
+
+
+

+ ☛An employee will creating automatically When you create a user. + +

+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+

Need Any Help?

+ +
+ + +