Browse Source

[ADD] Initial Commit

pull/72/head
Sreejith P 7 years ago
parent
commit
d42a6706bc
  1. 17
      hr_multi_company/README.md
  2. 25
      hr_multi_company/__init__.py
  3. 43
      hr_multi_company/__manifest__.py
  4. 6
      hr_multi_company/doc/RELEASE_NOTES.md
  5. 24
      hr_multi_company/models/__init__.py
  6. BIN
      hr_multi_company/models/__pycache__/__init__.cpython-35.pyc
  7. BIN
      hr_multi_company/models/__pycache__/hr_multi_company.cpython-35.pyc
  8. 51
      hr_multi_company/models/hr_multi_company.py
  9. BIN
      hr_multi_company/static/description/HRMS-BUTTON.png
  10. BIN
      hr_multi_company/static/description/banner.jpg
  11. BIN
      hr_multi_company/static/description/cybro-service.png
  12. BIN
      hr_multi_company/static/description/cybro_logo.png
  13. BIN
      hr_multi_company/static/description/icon.png
  14. 108
      hr_multi_company/static/description/index.html
  15. BIN
      hr_multi_company/static/description/multi_company.png
  16. BIN
      hr_multi_company/static/description/oh_attendance.png
  17. 57
      hr_multi_company/views/hr_company_view.xml
  18. 72
      hr_multi_company/views/multi_company_view.xml

17
hr_multi_company/README.md

@ -0,0 +1,17 @@
OHRMS Multi Company
---------------------
Supporting Addon for Open HRMS, Added Advance Fields On Employee Master
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
Jesni Banu - jesni@cybrosys.in
Website:
https://www.openhrms.com
https://www.cybrosys.com

25
hr_multi_company/__init__.py

@ -0,0 +1,25 @@
# -*- 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: Jesni Banu (<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

43
hr_multi_company/__manifest__.py

@ -0,0 +1,43 @@
# -*- 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: Jesni Banu (<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 Multi-Company',
'version': '11.0.1.0.0',
'summary': """Enables Multi-Company""",
'description': 'This module enables multi company features',
'category': 'Generic Modules/Human Resources',
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'website': "https://www.openhrms.com",
'depends': ['base', 'hr_contract', 'hr_payroll', 'hr_expense', 'hr_attendance', 'hr_employee_transfer'],
'data': [
'views/hr_company_view.xml',
'views/multi_company_view.xml',
],
'demo': [],
'images': ['static/description/banner.jpg'],
'license': 'AGPL-3',
'installable': True,
'auto_install': False,
'application': False,
}

6
hr_multi_company/doc/RELEASE_NOTES.md

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

24
hr_multi_company/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: Jesni Banu (<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 hr_multi_company

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

Binary file not shown.

BIN
hr_multi_company/models/__pycache__/hr_multi_company.cpython-35.pyc

Binary file not shown.

51
hr_multi_company/models/hr_multi_company.py

@ -0,0 +1,51 @@
# -*- 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: Jesni Banu (<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
class HrAttendanceMultiCompany(models.Model):
_inherit = 'hr.attendance'
company_id = fields.Many2one('res.company', 'Company', copy=False, readonly=True,
default=lambda self: self.env.user.company_id)
class HrLeaveMultiCompany(models.Model):
_inherit = 'hr.holidays'
company_id = fields.Many2one('res.company', 'Company', copy=False, readonly=True,
default=lambda self: self.env.user.company_id)
class HrPayslipMultiCompany(models.Model):
_inherit = 'hr.payslip.run'
company_id = fields.Many2one('res.company', 'Company', copy=False, readonly=True,
default=lambda self: self.env.user.company_id)
class HrSalaryCategoryMultiCompany(models.Model):
_inherit = 'hr.salary.rule.category'
company_id = fields.Many2one('res.company', 'Company', copy=False, readonly=True,
default=lambda self: self.env.user.company_id)

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
hr_multi_company/static/description/banner.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 KiB

BIN
hr_multi_company/static/description/cybro_logo.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
hr_multi_company/static/description/icon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

108
hr_multi_company/static/description/index.html

@ -0,0 +1,108 @@
<section class="oe_container">
<div class="oe_row">
<h2 class="oe_slogan"><a href="https://www.openhrms.com">Open HRMS</a></h2>
<h3 class="oe_slogan">Most advanced open source HR management software</h3>
</div>
</section>
<section class="oe_container oe_dark">
<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">Open HRMS Multi Company</h2>
<h3 class="oe_slogan">Managing Multi Company In HR Processes</h3>
<h4 class="oe_slogan"><a href="https://www.cybrosys.com">Cybrosys Technologies</a> </h4>
</div>
<div class="oe_row oe_spaced" style="padding-left:65px;">
<h4>Features:</h4>
<div>
<span style="color:green;"> &#9745; </span>Managing multi company.<br/>
</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 enables hr multi company, hence hr manager can easily handle
multi company process separately. We can activate multi company feature in general settings as usual.
This will automatically add company field in every hr related records.
</p>
</div>
</div>
</section>
<section class="oe_container">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Multi Company In Leaves</h4>
<div class="oe_span12">
<div class="oe_row_img oe_centered">
<img class="oe_picture oe_screenshot" src="multi_company.png">
</div>
</div>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<h4 class="oe_slogan">Multi Company In Attendance</h4>
<div class="oe_span12">
<div class="oe_row_img oe_centered">
<img class="oe_picture oe_screenshot" src="oh_attendance.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
hr_multi_company/static/description/multi_company.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

BIN
hr_multi_company/static/description/oh_attendance.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

57
hr_multi_company/views/hr_company_view.xml

@ -0,0 +1,57 @@
<?xml version="1.0" ?>
<odoo>
<record model="ir.ui.view" id="hr_holidays_inherit_form_view1">
<field name="name">hr.holidays.form.view1</field>
<field name="model">hr.holidays</field>
<field name="inherit_id" ref="hr_holidays.edit_holiday_new"/>
<field name="arch" type="xml">
<field name="department_id" position="after">
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="hr_contract_inherit_form_view1">
<field name="name">hr.contract.form.view1</field>
<field name="model">hr.contract</field>
<field name="inherit_id" ref="hr_contract.hr_contract_view_form"/>
<field name="arch" type="xml">
<field name="job_id" position="after">
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="hr_attendance_inherit_form_view1">
<field name="name">hr.attendance.form.view1</field>
<field name="model">hr.attendance</field>
<field name="inherit_id" ref="hr_attendance.hr_attendance_view_form"/>
<field name="arch" type="xml">
<field name="check_out" position="after">
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="hr_payslip_batch_inherit_form_view1">
<field name="name">hr.payslip.run.form.view1</field>
<field name="model">hr.payslip.run</field>
<field name="inherit_id" ref="hr_payroll.hr_payslip_run_form"/>
<field name="arch" type="xml">
<field name="credit_note" position="after">
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="hr_salary_category_inherit_form_view1">
<field name="name">hr.salary.rule.category.form.view1</field>
<field name="model">hr.salary.rule.category</field>
<field name="inherit_id" ref="hr_payroll.hr_salary_rule_category_form"/>
<field name="arch" type="xml">
<field name="code" position="after">
<field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>
</field>
</field>
</record>
</odoo>

72
hr_multi_company/views/multi_company_view.xml

@ -0,0 +1,72 @@
<?xml version="1.0" ?>
<odoo>
<record id="property_rule_department" model="ir.rule">
<field name="name">Department Create, Write, Unlink</field>
<field name="model_id" ref="hr.model_hr_department"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="hr_salary_rules_company" model="ir.rule">
<field name="name">Salary rules of my Company</field>
<field name="model_id" ref="hr_payroll.model_hr_salary_rule"/>
<field eval="False" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="hr_payroll_structure_company" model="ir.rule">
<field name="name">Salary structures of my Company</field>
<field name="model_id" ref="hr_payroll.model_hr_payroll_structure"/>
<field eval="False" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="hr_payroll_batches_company" model="ir.rule">
<field name="name">Payslips batches of my Company</field>
<field name="model_id" ref="hr_payroll.model_hr_payslip"/>
<field eval="False" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="hr_payroll_payslip_company" model="ir.rule">
<field name="name">Payslips of my Company</field>
<field name="model_id" ref="hr_payroll.model_hr_payslip_run"/>
<field eval="False" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="hr_payroll_salary_category_company" model="ir.rule">
<field name="name">Salary Category of my Company</field>
<field name="model_id" ref="hr_payroll.model_hr_salary_rule_category"/>
<field eval="False" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="hr_payroll_contribution_company" model="ir.rule">
<field name="name">Payslips Contribution of my Company</field>
<field name="model_id" ref="hr_payroll.model_hr_contribution_register"/>
<field eval="False" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="hr_payroll_attendance_company" model="ir.rule">
<field name="name">Attendance of my Company</field>
<field name="model_id" ref="hr_attendance.model_hr_attendance"/>
<field eval="False" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="hr_holidays_company" model="ir.rule">
<field name="name">Holidays of my Company</field>
<field name="model_id" ref="hr_holidays.model_hr_holidays"/>
<field eval="False" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="hr_expense_company" model="ir.rule">
<field name="name">Expense of my Company</field>
<field name="model_id" ref="hr_expense.model_hr_expense"/>
<field eval="False" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
</odoo>
Loading…
Cancel
Save