diff --git a/oh_employee_creation_from_user/README.md b/oh_employee_creation_from_user/README.md new file mode 100644 index 000000000..9081552e2 --- /dev/null +++ b/oh_employee_creation_from_user/README.md @@ -0,0 +1,17 @@ +OH Employees From User +--------------------- +Supporting Addon for Open HRMS, Creates Employee While Creating User + +Connect with experts +-------------------- + +If you have any question/queries/additional works on OpenHRMS or this module, You can drop an email directly to Cybrosys. + +Contacts +-------- +info - info@cybrosys.com +Nilmar Shereef - shereef@cybrosys.in + +Website: +https://www.openhrms.com +https://www.cybrosys.com diff --git a/oh_employee_creation_from_user/RELEASE_NOTES.md b/oh_employee_creation_from_user/RELEASE_NOTES.md new file mode 100644 index 000000000..f7edd989f --- /dev/null +++ b/oh_employee_creation_from_user/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 30.03.2018 +#### Version 10.0.1.0.0 +##### ADD +- Initial commit for OpenHrms Project diff --git a/oh_employee_creation_from_user/__init__.py b/oh_employee_creation_from_user/__init__.py new file mode 100644 index 000000000..5c25abc04 --- /dev/null +++ b/oh_employee_creation_from_user/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +################################################################################### +# A part of OpenHRMS Project +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2018-TODAY Cybrosys Technologies (). +# Author: Nilmar Shereef () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### +from . import models + + diff --git a/oh_employee_creation_from_user/__manifest__.py b/oh_employee_creation_from_user/__manifest__.py new file mode 100644 index 000000000..073a19a20 --- /dev/null +++ b/oh_employee_creation_from_user/__manifest__.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +################################################################################### +# A part of OpenHRMS Project +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2018-TODAY Cybrosys Technologies (). +# Author: Nilmar Shereef () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### +{ + 'name': 'OHRMS Employees From User', + 'version': '10.0.1.0.0', + 'summary': 'Automatically Creates Employee While Creating User', + 'description': 'This module helps you to create employees automatically while creating users', + 'category': 'Generic Modules/Human Resources', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'website': "https://www.openhrms.com", + 'depends': ['base', 'hr'], + 'data': ['employee_creation_from_user_view.xml'], + 'demo': [], + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/oh_employee_creation_from_user/models/__init__.py b/oh_employee_creation_from_user/models/__init__.py new file mode 100644 index 000000000..998e57174 --- /dev/null +++ b/oh_employee_creation_from_user/models/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +################################################################################### +# A part of OpenHRMS Project +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2018-TODAY Cybrosys Technologies (). +# Author: Nilmar Shereef () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### +from . import employee_creation_from_user + diff --git a/oh_employee_creation_from_user/models/employee_creation_from_user.py b/oh_employee_creation_from_user/models/employee_creation_from_user.py new file mode 100644 index 000000000..0132c963d --- /dev/null +++ b/oh_employee_creation_from_user/models/employee_creation_from_user.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +################################################################################### +# A part of OpenHRMS Project +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2018-TODAY Cybrosys Technologies (). +# Author: Nilmar Shereef () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# 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 Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### +from odoo import models, fields, api, _ + + +class ResUsersInherit(models.Model): + _inherit = 'res.users' + + employee_id = fields.Many2one('hr.employee', + string='Related Employee', ondelete='restrict', auto_join=True, + help='Employee-related data of the user') + + @api.model + def create(self, vals): + result = super(ResUsersInherit, self).create(vals) + result['employee_id'] = self.env['hr.employee'].sudo().create({'name': result['name'], + 'user_id': result['id'], + 'address_home_id': result['partner_id'].id}) + return result diff --git a/oh_employee_creation_from_user/static/description/HRMS-BUTTON.png b/oh_employee_creation_from_user/static/description/HRMS-BUTTON.png new file mode 100644 index 000000000..0f1b65bea Binary files /dev/null and b/oh_employee_creation_from_user/static/description/HRMS-BUTTON.png differ diff --git a/oh_employee_creation_from_user/static/description/banner.jpg b/oh_employee_creation_from_user/static/description/banner.jpg new file mode 100644 index 000000000..fcaa5db99 Binary files /dev/null and b/oh_employee_creation_from_user/static/description/banner.jpg differ diff --git a/oh_employee_creation_from_user/static/description/cybro-service.png b/oh_employee_creation_from_user/static/description/cybro-service.png new file mode 100644 index 000000000..0a648278c Binary files /dev/null and b/oh_employee_creation_from_user/static/description/cybro-service.png differ diff --git a/oh_employee_creation_from_user/static/description/cybro_logo.png b/oh_employee_creation_from_user/static/description/cybro_logo.png new file mode 100644 index 000000000..bb309114c Binary files /dev/null and b/oh_employee_creation_from_user/static/description/cybro_logo.png differ diff --git a/oh_employee_creation_from_user/static/description/icon.png b/oh_employee_creation_from_user/static/description/icon.png new file mode 100644 index 000000000..d0c6a7c4c Binary files /dev/null and b/oh_employee_creation_from_user/static/description/icon.png differ diff --git a/oh_employee_creation_from_user/static/description/index.html b/oh_employee_creation_from_user/static/description/index.html new file mode 100644 index 000000000..390806c4b --- /dev/null +++ b/oh_employee_creation_from_user/static/description/index.html @@ -0,0 +1,93 @@ +
+
+
+

OpenHRMS

+

Most advanced open source HR management software

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

Employee From User

+

An employee will creates automatically while creating user

+

Author : Cybrosys Techno Solutions , www.cybrosys.com

+
+
+
+ ♠This module automatically creates employee while creating user. +
+
+
+ +
+
+
+

+ ☛An employee will creates automatically while creating user. +

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

Our Odoo Services

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

Need Any Help?

+ +
+ + + diff --git a/oh_employee_creation_from_user/static/description/oh_employee.png b/oh_employee_creation_from_user/static/description/oh_employee.png new file mode 100644 index 000000000..623ce63be Binary files /dev/null and b/oh_employee_creation_from_user/static/description/oh_employee.png differ diff --git a/oh_employee_creation_from_user/static/description/oh_user.png b/oh_employee_creation_from_user/static/description/oh_user.png new file mode 100644 index 000000000..4c12a39fd Binary files /dev/null and b/oh_employee_creation_from_user/static/description/oh_user.png differ diff --git a/oh_employee_creation_from_user/views/employee_creation_from_user_view.xml b/oh_employee_creation_from_user/views/employee_creation_from_user_view.xml new file mode 100644 index 000000000..68c956e80 --- /dev/null +++ b/oh_employee_creation_from_user/views/employee_creation_from_user_view.xml @@ -0,0 +1,16 @@ + + + + + res.users.form + res.users + + + + + + + + + \ No newline at end of file