Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 23 additions & 5 deletions volunteer_attendance/README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

=====================
Volunteer Attendances
=====================
Expand All @@ -17,7 +13,7 @@ Volunteer Attendances
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-beescoop%2FObeesdoo-lightgray.png?logo=github
Expand All @@ -33,6 +29,20 @@ Specify status of a volunteer's attendance to a shift.
.. contents::
:local:

Known issues / Roadmap
======================

- The purpose of the smart button used for the attendance state in the shift form view is not clear.

- Redesign the smart button

- A help attribute for the attendance state field could help understand better this functionality

- The "attendance_state" field is not present in the shift list view.

Add atendance_state to shift list view


Bug Tracker
===========

Expand Down Expand Up @@ -61,6 +71,14 @@ Contributors
Maintainers
~~~~~~~~~~~

.. |maintainer-remytms| image:: https://github.com/remytms.png?size=40px
:target: https://github.com/remytms
:alt: remytms

Current maintainer:

|maintainer-remytms|

This module is part of the `beescoop/Obeesdoo <https://github.com/beescoop/Obeesdoo/tree/16.0/volunteer_attendance>`_ project on GitHub.

You are welcome to contribute.
11 changes: 5 additions & 6 deletions volunteer_attendance/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,20 @@
"category": "Volunteer management",
"website": "https://github.com/beescoop/Obeesdoo",
"author": "Coop IT Easy SC",
"maintainers": ["remytms"],
"license": "AGPL-3",
"application": False,
"depends": ["base", "volunteer", "mail"],
"data": [
"security/ir.model.access.csv",
"security/volunteer_security.xml",
"views/volunteer_shift_attendance_status_views.xml",
"views/volunteer_menu.xml",
"views/volunteer_shift_views.xml",
"views/volunteer_volunteer_views.xml",
"views/volunteer_shift_participation_views.xml",
],
"demo": [],
"assets": {
"web.assets_backend": [
"volunteer/static/src/scss/volunteer_shift.scss",
],
},
"demo": [
"demo/volunteer_shift_attendance_status_demo.xml",
],
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
SPDX-FileCopyrightText: 2025 Coop IT Easy SC

SPDX-License-Identifier: AGPL-3.0-or-later
-->
<odoo>
<record
id="volunteer_shift_attendance_status_demo_present"
model="volunteer.shift.attendance.status"
>
<field name="name">Present</field>
<field name="description">Present during shift</field>
<field name="company_id" />
</record>

<record
id="volunteer_shift_attendance_status_demo_absent"
model="volunteer.shift.attendance.status"
>
<field name="name">Absent</field>
<field name="description">Unjustified absence during shift</field>
<field name="company_id" />
</record>

<record
id="volunteer_shift_attendance_status_demo_excused"
model="volunteer.shift.attendance.status"
>
<field name="name">Excused</field>
<field name="description">Justified absence during shift</field>
<field name="company_id" />
</record>
</odoo>
1 change: 1 addition & 0 deletions volunteer_attendance/models/volunteer_shift.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@ def action_display_attendance_state(self):
"domain": [
("shift_id", "=", [self.id]),
("attendance_status_id", "=", None),
("registration_state", "!=", "canceled"),
],
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class VolunteerShiftAttendanceStatus(models.Model):
comodel_name="res.company",
string="Company",
default=lambda self: self.env.user.company_id,
required=True,
)

# SQL Constraints
Expand Down
9 changes: 4 additions & 5 deletions volunteer_attendance/models/volunteer_shift_participation.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,19 @@ def _check_no_attendance_status_for_canceled_participation(self):
for participation in self:
if (
participation.registration_state == "canceled"
and participation.attendance_status_id is not None
and participation.attendance_status_id.id
):
raise ValidationError(
_(
"An attendance status for a canceled participation "
"will not be taken into account for the attendance state "
"of the shift."
"will not be taken into account. "
)
)

# Methods

@api.depends("attendance_status_id")
def write(self, vals):
"""Set attendance status modification date to now at modification"""
vals["attendance_date"] = fields.Datetime.now()
if "attendance_status_id" in vals:
vals["attendance_date"] = fields.Datetime.now()
return super().write(vals)
10 changes: 10 additions & 0 deletions volunteer_attendance/readme/ROADMAP.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
- The purpose of the smart button used for the attendance state in the shift form view is not clear.

- Redesign the smart button

- A help attribute for the attendance state field could help understand better this functionality

- The "attendance_state" field is not present in the shift list view.

Add atendance_state to shift list view

14 changes: 14 additions & 0 deletions volunteer_attendance/security/volunteer_security.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
SPDX-FileCopyrightText: 2025 Coop IT Easy SC

SPDX-License-Identifier: AGPL-3.0-or-later
-->
<odoo>
<record id="volunteer_attendance_status_rule_company" model="ir.rule">
<field name="name">Volunteer Attendance Status: Company Access</field>
<field name="model_id" ref="model_volunteer_shift_attendance_status" />
<field name="domain_force">[('company_id', 'in', company_ids + [False])]
</field>
</record>
</odoo>
43 changes: 32 additions & 11 deletions volunteer_attendance/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,40 +367,59 @@ <h1 class="title">Volunteer Attendances</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:98eae0e33d84c4a84fa98c6fee18b1f918e2a210537971887984a726de4e88b4
!! source digest: sha256:05f84ac2073b75506f103a749e6902b5a2f17f7007418068c1aafcead3547aeb
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/beescoop/Obeesdoo/tree/16.0/volunteer_attendance"><img alt="beescoop/Obeesdoo" src="https://img.shields.io/badge/github-beescoop%2FObeesdoo-lightgray.png?logo=github" /></a></p>
<p>Specify status of a volunteer’s attendance to a shift.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-1">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-2">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-3">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-4">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-5">Maintainers</a></li>
<li><a class="reference internal" href="#known-issues-roadmap" id="toc-entry-1">Known issues / Roadmap</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-2">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-3">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-4">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-5">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-6">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="known-issues-roadmap">
<h1><a class="toc-backref" href="#toc-entry-1">Known issues / Roadmap</a></h1>
<ul>
<li><p class="first">The purpose of the smart button used for the attendance state in the shift form view is not clear.</p>
<blockquote>
<ul class="simple">
<li>Redesign the smart button</li>
<li>A help attribute for the attendance state field could help understand better this functionality</li>
</ul>
</blockquote>
</li>
<li><p class="first">The “attendance_state” field is not present in the shift list view.</p>
<blockquote>
<p>Add atendance_state to shift list view</p>
</blockquote>
</li>
</ul>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h1>
<h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/beescoop/Obeesdoo/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/beescoop/Obeesdoo/issues/new?body=module:%20volunteer_attendance%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#toc-entry-2">Credits</a></h1>
<h1><a class="toc-backref" href="#toc-entry-3">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#toc-entry-3">Authors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-4">Authors</a></h2>
<ul class="simple">
<li>Coop IT Easy SC</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<ul class="simple">
<li><a class="reference external" href="https://coopiteasy.be">Coop IT Easy SC</a>:<ul>
<li>Geneviève Ernould</li>
Expand All @@ -409,7 +428,9 @@ <h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
<p>Current maintainer:</p>
<p><a class="reference external image-reference" href="https://github.com/remytms"><img alt="remytms" src="https://github.com/remytms.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/beescoop/Obeesdoo/tree/16.0/volunteer_attendance">beescoop/Obeesdoo</a> project on GitHub.</p>
<p>You are welcome to contribute.</p>
</div>
Expand Down
1 change: 0 additions & 1 deletion volunteer_attendance/views/volunteer_menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ SPDX-FileCopyrightText: 2025 Coop IT Easy SC
SPDX-License-Identifier: AGPL-3.0-or-later
-->
<odoo>
<!-- Attendance Status Submenu -->
<menuitem
id="volunteer_attendance_separator_menu"
name="Attendances"
Expand Down
Loading