Browse Source

[ADD] Initial Commit

pull/72/head
Sreejith P 7 years ago
parent
commit
d1bba1a378
  1. 17
      oh_employee_creation_from_user/README.md
  2. 26
      oh_employee_creation_from_user/__init__.py
  3. 40
      oh_employee_creation_from_user/__manifest__.py
  4. 6
      oh_employee_creation_from_user/doc/RELEASE_NOTES.md
  5. 24
      oh_employee_creation_from_user/models/__init__.py
  6. BIN
      oh_employee_creation_from_user/models/__pycache__/__init__.cpython-35.pyc
  7. BIN
      oh_employee_creation_from_user/models/__pycache__/employee_creation_from_user.cpython-35.pyc
  8. 41
      oh_employee_creation_from_user/models/employee_creation_from_user.py
  9. BIN
      oh_employee_creation_from_user/static/description/HRMS-BUTTON.png
  10. BIN
      oh_employee_creation_from_user/static/description/banner.jpg
  11. BIN
      oh_employee_creation_from_user/static/description/cybro-service.png
  12. BIN
      oh_employee_creation_from_user/static/description/cybro_logo.png
  13. BIN
      oh_employee_creation_from_user/static/description/icon.png
  14. 107
      oh_employee_creation_from_user/static/description/index.html
  15. BIN
      oh_employee_creation_from_user/static/description/oh_employee.png
  16. BIN
      oh_employee_creation_from_user/static/description/oh_user.png
  17. 16
      oh_employee_creation_from_user/views/employee_creation_from_user_view.xml

17
oh_employee_creation_from_user/README.md

@ -0,0 +1,17 @@
Open HRMS 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

26
oh_employee_creation_from_user/__init__.py

@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
###################################################################################
# A part of Open HRMS Project <https://www.openhrms.com>
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>).
# Author: Nilmar Shereef (<https://www.cybrosys.com>)
#
# 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 <https://www.gnu.org/licenses/>.
#
###################################################################################
from . import models

40
oh_employee_creation_from_user/__manifest__.py

@ -0,0 +1,40 @@
# -*- coding: utf-8 -*-
###################################################################################
# A part of Open HRMS Project <https://www.openhrms.com>
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>).
# Author: Nilmar Shereef (<https://www.cybrosys.com>)
#
# 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 <https://www.gnu.org/licenses/>.
#
###################################################################################
{
'name': 'Open HRMS Employees From User',
'version': '11.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': ['views/employee_creation_from_user_view.xml'],
'demo': [],
'images': ['static/description/banner.jpg'],
'license': 'AGPL-3',
'installable': True,
'auto_install': False,
'application': False,
}

6
oh_employee_creation_from_user/doc/RELEASE_NOTES.md

@ -0,0 +1,6 @@
## Module <oh_employee_creation_from_user>
#### 30.03.2018
#### Version 11.0.1.0.0
##### ADD
- Initial commit for Open HRMS Project

24
oh_employee_creation_from_user/models/__init__.py

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
###################################################################################
# A part of Open HRMS Project <https://www.openhrms.com>
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>).
# Author: Nilmar Shereef (<https://www.cybrosys.com>)
#
# 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 <https://www.gnu.org/licenses/>.
#
###################################################################################
from . import employee_creation_from_user

BIN
oh_employee_creation_from_user/models/__pycache__/__init__.cpython-35.pyc

Binary file not shown.

BIN
oh_employee_creation_from_user/models/__pycache__/employee_creation_from_user.cpython-35.pyc

Binary file not shown.

41
oh_employee_creation_from_user/models/employee_creation_from_user.py

@ -0,0 +1,41 @@
# -*- coding: utf-8 -*-
###################################################################################
# A part of Open HRMS Project <https://www.openhrms.com>
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2018-TODAY Cybrosys Technologies (<https://www.cybrosys.com>).
# Author: Nilmar Shereef (<https://www.cybrosys.com>)
#
# 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 <https://www.gnu.org/licenses/>.
#
###################################################################################
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):
"""This code is to create an employee while creating an user."""
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

BIN
oh_employee_creation_from_user/static/description/HRMS-BUTTON.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
oh_employee_creation_from_user/static/description/banner.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

BIN
oh_employee_creation_from_user/static/description/cybro-service.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 KiB

BIN
oh_employee_creation_from_user/static/description/cybro_logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
oh_employee_creation_from_user/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

107
oh_employee_creation_from_user/static/description/index.html

@ -0,0 +1,107 @@
<section class="oe_container bg-gray-lighter" xmlns="http://www.w3.org/1999/html">
<div class="oe_row">
<h2 class="oe_slogan">Open HRMS</h2>
<h3 class="oe_slogan">Most advanced open source HR management software</h3>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced oe_mt32">
<div class="oe_span">
<div class="oe_demo oe_picture oe_screenshot">
<a href="https://www.openhrms.com/#request-demo">
<img src="HRMS-BUTTON.png">
</a>
</div>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan">Open HRMS Employee From User</h2>
<h3 class="oe_slogan">An employee will creates automatically while creating an user</h3>
<h4 class="oe_slogan">Author : Cybrosys Techno Solutions , www.cybrosys.com</h4>
</div>
<div class="oe_row oe_spaced">
<div>
<span style="color:green;"> &#9745; </span>This module automatically creates employee while creating an user.
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<div class="oe_picture">
<h3 class="oe_slogan">Overview</h3>
<p class="oe_mt32 text-justify" style="text-align: center;">
This module automatically creating employee in employee table while creating the users.
This will simplify the HR process.
</p>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">User</h4>
<div class="oe_span12">
<div class="oe_row_img oe_centered">
<img class="oe_picture oe_screenshot" src="oh_user.png">
</div>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Employee</h4>
<div class="oe_span12">
<div class="oe_row_img oe_centered">
<img class="oe_picture oe_screenshot" src="oh_employee.png">
</div>
</div>
</div>
</section>
<div class="row section-content">
<div class="col-md-6 img-content">
<h3>Our Odoo Services</h3>
</div>
<div class="bc-span col-md-12">
<div class="inner-span">
<a target="_blank" href="https://www.openhrms.com">
<img class="img-border img-responsive thumbnail" src="cybro-service.png">
</a>
</div>
</div>
</div>
<section class="oe_container">
<h2 class="oe_slogan" style="margin-top:20px;" >Need Any Help?</h2>
<div class="oe_slogan" style="margin-top:10px !important;">
<div>
<a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;"
href="https://www.cybrosys.com/contact/" target="_blank"><i
class="fa fa-phone"></i> Contact Us </a>
<a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;"
href="https://www.odoo.com/apps/modules/browse?search=open+hrms" target="_blank"><i
class="fa fa-suitcase"></i> Other Open HRMS Addons </a>
<a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;"
href="https://www.cybrosys.com/odoo-customization-and-installation/" target="_blank"><i
class="fa fa-wrench"></i> Request Customization </a>
</div>
<br>
<a href="https://www.cybrosys.com/" target="_blank">
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block">
</a>
</div>
</section>

BIN
oh_employee_creation_from_user/static/description/oh_employee.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

BIN
oh_employee_creation_from_user/static/description/oh_user.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

16
oh_employee_creation_from_user/views/employee_creation_from_user_view.xml

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="view_users_form_inherit" model="ir.ui.view">
<field name="name">res.users.form</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form"/>
<field name="arch" type="xml">
<xpath expr="//div[@class='oe_title']/group" position="inside">
<field name="employee_id" readonly="1" required="0" groups="base.group_no_one"
attrs="{'invisible': [('id', '=', False)]}"/>
</xpath>
</field>
</record>
</data>
</odoo>
Loading…
Cancel
Save