[NEW] hr_effective_attendance_period: create add-on

This commit is contained in:
Stéphan Sainléger
2023-01-18 14:38:51 +01:00
parent 4a5f926b1d
commit 2a6fb40a15
7 changed files with 118 additions and 0 deletions

View 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.

View File

@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import models

View 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,
}

View File

@@ -0,0 +1 @@
This directory should contain the *.po for Odoo translation.

View File

@@ -0,0 +1 @@
from . import resource

View 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)

View 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>