[NEW] hr_effective_attendance_period: create add-on
This commit is contained in:
43
hr_effective_attendance_period/README.rst
Normal file
43
hr_effective_attendance_period/README.rst
Normal file
@@ -0,0 +1,43 @@
|
||||
==============================
|
||||
hr_effective_attendance_period
|
||||
==============================
|
||||
|
||||
Provide indication that attendance are effectively worked periods or not
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
Use Odoo normal module installation procedure to install
|
||||
``hr_effective_attendance_period``.
|
||||
|
||||
Known issues / Roadmap
|
||||
======================
|
||||
|
||||
None yet.
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
Bugs are tracked on `our issues website <https://github.com/elabore-coop/hr-tools/issues>`_. In case of
|
||||
trouble, please check there if your issue has already been
|
||||
reported. If you spotted it first, help us smashing it by providing a
|
||||
detailed and welcomed feedback.
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Contributors
|
||||
------------
|
||||
|
||||
* Stéphan Sainléger
|
||||
|
||||
Funders
|
||||
-------
|
||||
|
||||
The development of this module has been financially supported by:
|
||||
* Elabore (https://elabore.coop)
|
||||
|
||||
|
||||
Maintainer
|
||||
----------
|
||||
|
||||
This module is maintained by Elabore.
|
3
hr_effective_attendance_period/__init__.py
Normal file
3
hr_effective_attendance_period/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import models
|
37
hr_effective_attendance_period/__manifest__.py
Normal file
37
hr_effective_attendance_period/__manifest__.py
Normal file
@@ -0,0 +1,37 @@
|
||||
# Copyright 2023 Stéphan Sainléger (Elabore)
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
"name": "hr_effective_attendance_period",
|
||||
"version": "14.0.1.0.0",
|
||||
"author": "Elabore",
|
||||
"website": "https://elabore.coop",
|
||||
"maintainer": "Stéphan Sainléger",
|
||||
"license": "AGPL-3",
|
||||
"category": "Tools",
|
||||
"summary": "Provide indication that attendance are effectively worked periods or not",
|
||||
# any module necessary for this one to work correctly
|
||||
"depends": [
|
||||
"base",
|
||||
"resource",
|
||||
],
|
||||
"qweb": [
|
||||
# "static/src/xml/*.xml",
|
||||
],
|
||||
"external_dependencies": {
|
||||
"python": [],
|
||||
},
|
||||
# always loaded
|
||||
"data": [
|
||||
"views/resource_views.xml",
|
||||
],
|
||||
# only loaded in demonstration mode
|
||||
"demo": [],
|
||||
"js": [],
|
||||
"css": [],
|
||||
"installable": True,
|
||||
# Install this module automatically if all dependency have been previously
|
||||
# and independently installed. Used for synergetic or glue modules.
|
||||
"auto_install": False,
|
||||
"application": False,
|
||||
}
|
1
hr_effective_attendance_period/i18n/README
Normal file
1
hr_effective_attendance_period/i18n/README
Normal file
@@ -0,0 +1 @@
|
||||
This directory should contain the *.po for Odoo translation.
|
1
hr_effective_attendance_period/models/__init__.py
Normal file
1
hr_effective_attendance_period/models/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import resource
|
7
hr_effective_attendance_period/models/resource.py
Normal file
7
hr_effective_attendance_period/models/resource.py
Normal file
@@ -0,0 +1,7 @@
|
||||
from odoo import models, fields
|
||||
|
||||
|
||||
class ResourceCalendarAttendance(models.Model):
|
||||
_inherit = "resource.calendar.attendance"
|
||||
|
||||
effective_attendance_period = fields.Boolean('Effective Attendance Period', store=True)
|
26
hr_effective_attendance_period/views/resource_views.xml
Normal file
26
hr_effective_attendance_period/views/resource_views.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
<record id="view_resource_calendar_attendance_tree_inherit_effective_attendance"
|
||||
model="ir.ui.view">
|
||||
<field name="name">resource.calendar.attendance.view.tree.inherit</field>
|
||||
<field name="model">resource.calendar.attendance</field>
|
||||
<field name="inherit_id" ref="resource.view_resource_calendar_attendance_tree" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='week_type']" position="after">
|
||||
<field name="effective_attendance_period" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_resource_calendar_attendance_form_inherit_effective_attendance"
|
||||
model="ir.ui.view">
|
||||
<field name="name">resource.calendar.attendance.view.tree.inherit</field>
|
||||
<field name="model">resource.calendar.attendance</field>
|
||||
<field name="inherit_id" ref="resource.view_resource_calendar_attendance_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='day_period']" position="after">
|
||||
<field name="effective_attendance_period" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
Reference in New Issue
Block a user