Browse Source

[ADD] Initial Commit

pull/78/head
Sreejith 7 years ago
parent
commit
b23b564e57
  1. 17
      oh_employee_creation_from_user/README.md
  2. 6
      oh_employee_creation_from_user/RELEASE_NOTES.md
  3. 25
      oh_employee_creation_from_user/__init__.py
  4. 40
      oh_employee_creation_from_user/__manifest__.py
  5. 24
      oh_employee_creation_from_user/models/__init__.py
  6. 39
      oh_employee_creation_from_user/models/employee_creation_from_user.py
  7. BIN
      oh_employee_creation_from_user/static/description/HRMS-BUTTON.png
  8. BIN
      oh_employee_creation_from_user/static/description/banner.jpg
  9. BIN
      oh_employee_creation_from_user/static/description/cybro-service.png
  10. BIN
      oh_employee_creation_from_user/static/description/cybro_logo.png
  11. BIN
      oh_employee_creation_from_user/static/description/icon.png
  12. 93
      oh_employee_creation_from_user/static/description/index.html
  13. BIN
      oh_employee_creation_from_user/static/description/oh_employee.png
  14. BIN
      oh_employee_creation_from_user/static/description/oh_user.png
  15. 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 @@
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

6
oh_employee_creation_from_user/RELEASE_NOTES.md

@ -0,0 +1,6 @@
## Module <oh_employee_creation_from_user>
#### 30.03.2018
#### Version 10.0.1.0.0
##### ADD
- Initial commit for OpenHrms Project

25
oh_employee_creation_from_user/__init__.py

@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
###################################################################################
# A part of OpenHRMS 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 OpenHRMS 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': '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,
}

24
oh_employee_creation_from_user/models/__init__.py

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
###################################################################################
# A part of OpenHRMS 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

39
oh_employee_creation_from_user/models/employee_creation_from_user.py

@ -0,0 +1,39 @@
# -*- coding: utf-8 -*-
###################################################################################
# A part of OpenHRMS 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):
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: 123 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

93
oh_employee_creation_from_user/static/description/index.html

@ -0,0 +1,93 @@
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<div class="oe_span">
<h2 class="oe_slogan">OpenHRMS</h2>
<h3 class="oe_slogan">Most advanced open source HR management software</h3>
</div>
</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 class="oe_demo_footer oe_centeralign">Online Demo</div>
</div>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan">Employee From User</h2>
<h3 class="oe_slogan">An employee will creates automatically while creating user</h3>
<h4 class="oe_slogan">Author : Cybrosys Techno Solutions , www.cybrosys.com</h4>
</div>
<div class="oe_row oe_spaced">
<div>
&spades;This module automatically creates employee while creating user.
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<div class="oe_span12">
<p class='oe_mt32'>
&#9755;An employee will creates automatically while creating user.
</p>
</div>
<div class="oe_span12">
<div class="oe_demo oe_picture oe_screenshot">
<img style="border:8px solid white;" src="oh_user.png">
</div>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<div class="oe_span12">
<div class="oe_demo oe_picture oe_screenshot">
<img style="border:8px solid white;" 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"><i
class="fa fa-envelope"></i> Email </a> <a
class="btn btn-primary btn-lg mt8" style="color: #FFFFFF !important;border-radius: 0;"
href="https://www.cybrosys.com/contact/"><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.cybrosys.com/odoo-customization-and-installation/"><i
class="fa fa-check-square"></i> Request Customization </a>
</div>
<br>
<img src="cybro_logo.png" style="width: 190px; margin-bottom: 20px;" class="center-block">
</div>
</section>

BIN
oh_employee_creation_from_user/static/description/oh_employee.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

BIN
oh_employee_creation_from_user/static/description/oh_user.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 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