Skip to content

Commit

Permalink
Merge e3adebc into abbb5c4
Browse files Browse the repository at this point in the history
  • Loading branch information
andhit-r committed May 25, 2018
2 parents abbb5c4 + e3adebc commit 990e001
Show file tree
Hide file tree
Showing 7 changed files with 148 additions and 0 deletions.
39 changes: 39 additions & 0 deletions hr_attendance_configuration_page/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3

==================================
HR Attendance - Configuration Page
==================================


Installation
============

To install this module, you need to:

1. Clone the branch 8.0 of the repository https://github.com/open-synergy/opnsynid-hr
2. Add the path to this repository in your configuration (addons-path)
3. Update the module list
4. Go to menu *Setting -> Modules -> Local Modules*
5. Search For *HR Attendance - Configuration Page*
6. Install the module

Credits
=======

Contributors
------------

* Michael Viriyananda <viriyananda.michael@gmail.com>
* Andhitia Rama <andhitia.r@gmail.com>
* Nurazmi <azmimr67@gmail.com>

Maintainer
----------

.. image:: https://opensynergy-indonesia.com/logo.png
:alt: OpenSynergy Indonesia
:target: https://opensynergy-indonesia.com

This module is maintained by the OpenSynergy Indonesia.
5 changes: 5 additions & 0 deletions hr_attendance_configuration_page/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2018 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models
19 changes: 19 additions & 0 deletions hr_attendance_configuration_page/__openerp__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
# Copyright 2018 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "HR Attendance - Configuration Page",
"version": "8.0.1.0.0",
"category": "Hidden",
"website": "https://opensynergy-indonesia.com",
"author": "OpenSynergy Indonesia",
"license": "AGPL-3",
"installable": True,
"auto_install": True,
"depends": [
"hr_attendance",
],
"data": [
"views/hr_attendance_config_setting_views.xml",
],
}
5 changes: 5 additions & 0 deletions hr_attendance_configuration_page/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2018 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import res_config
21 changes: 21 additions & 0 deletions hr_attendance_configuration_page/models/res_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
# Copyright 2018 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from openerp import models, fields, api


class ResConfig(models.TransientModel):
_name = "hr.attendance_config_setting"
_inherit = "res.config.settings"

@api.model
def _default_company_id(self):
return self.env.user.company_id.id

company_id = fields.Many2one(
string="Company",
comodel_name="res.company",
required=True,
default=lambda self: self._default_company_id(),
)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2018 OpenSynergy Indonesia
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->

<openerp>
<data>

<record id="hr_attendance_config_setting_view_form" model="ir.ui.view">
<field name="name">hr.attendance_config_setting form</field>
<field name="model">hr.attendance_config_setting</field>
<field name="mode">primary</field>
<field name="arch" type="xml">
<form class="oe_form_configuration">
<header>
<button name="execute" string="Apply" type="object" class="oe_highlight"/>
or
<button name="cancel" string="Cancel" type="object" class="oe_link"/>
</header>
<field name="company_id" invisible="1"/>
<separator string="Feature &amp; Integration"/>
<group name="feature_integration">
<label for="id" string="Feature"/>
<div>
</div>
<label for="id" string="Integration"/>
<div>
</div>
</group>
<separator string="General Configuration"/>
<group name="general_configuration">
<label for="id" string="Technical"/>
<div>
</div>
</group>
</form>
</field>
</record>


<record id="hr_attendance_config_setting_action" model="ir.actions.act_window">
<field name="name">Attendance Configuration</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr.attendance_config_setting</field>
<field name="view_type">form</field>
<field name="target">inline</field>
<field name="view_mode">form</field>
</record>

<menuitem
id="hr_attendance_config_setting_menu"
name="Configuration"
parent="hr.menu_open_view_attendance_reason_new_config"
action="hr_attendance_config_setting_action"
sequence="0"
/>


</data>
</openerp>

0 comments on commit 990e001

Please sign in to comment.