Browse Source

[ADD]Initial Commit

pull/81/head
SHEREEF PT 8 years ago
parent
commit
1d07a8678a
  1. 2
      employee_creation_from_user/__init__.py
  2. 39
      employee_creation_from_user/__openerp__.py
  3. 39
      employee_creation_from_user/employee_creation_from_user.py
  4. 16
      employee_creation_from_user/employee_creation_from_user_view.xml
  5. BIN
      employee_creation_from_user/static/description/11.png
  6. BIN
      employee_creation_from_user/static/description/22.png
  7. BIN
      employee_creation_from_user/static/description/banner.jpg
  8. BIN
      employee_creation_from_user/static/description/icon.png
  9. 67
      employee_creation_from_user/static/description/index.html

2
employee_creation_from_user/__init__.py

@ -0,0 +1,2 @@
# -*- coding: utf-8 -*-
import employee_creation_from_user

39
employee_creation_from_user/__openerp__.py

@ -0,0 +1,39 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Cybrosys Technologies Pvt. Ltd.
# Copyright (C) 2014-TODAY Cybrosys Technologies(<http://www.cybrosys.com>).
# Author: Jesni Banu(<http://www.cybrosys.com>)
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'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,
}

39
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(<http://www.cybrosys.com>).
# Author: Jesni Banu(<http://www.cybrosys.com>)
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
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

16
employee_creation_from_user/employee_creation_from_user_view.xml

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<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>
</openerp>

BIN
employee_creation_from_user/static/description/11.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

BIN
employee_creation_from_user/static/description/22.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

BIN
employee_creation_from_user/static/description/banner.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

BIN
employee_creation_from_user/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

67
employee_creation_from_user/static/description/index.html

@ -0,0 +1,67 @@
<section class="oe_container">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan">Employees From User</h2>
<h3 class="oe_slogan">This Module automatically creating employees from 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 creating employees from 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 creating automatically When you create a user.
</p>
</div>
<div class="oe_span12">
<div class="oe_demo oe_picture oe_screenshot">
<img style="border:8px solid white;" src="11.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="22.png">
</div>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<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="http://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="http://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="http://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>
<a href="https://twitter.com/cybrosys" target="_blank"><i class="fa fa-2x fa-twitter" style="color:white;background: #00a0d1;width:35px;"></i></a></td>
<a href="https://www.linkedin.com/company/cybrosys-technologies-pvt-ltd" target="_blank"><i class="fa fa-2x fa-linkedin" style="color:white;background: #31a3d6;width:35px;padding-left: 3px;"></i></a></td>
<a href="https://www.facebook.com/cybrosystechnologies" target="_blank"><i class="fa fa-2x fa-facebook" style="color:white;background: #3b5998;width:35px;padding-left: 8px;"></i></a></td>
<a href="https://plus.google.com/106641282743045431892/about" target="_blank"><i class="fa fa-2x fa-google-plus" style="color:white;background: #c53c2c;width:35px;padding-left: 3px;"></i></a></td>
<a href="https://in.pinterest.com/cybrosys" target="_blank"><i class="fa fa-2x fa-pinterest" style="color:white;background: #ac0f18;width:35px;padding-left: 3px;"></i></a></td>
</div>
</div>
</section>
Loading…
Cancel
Save