diff --git a/volunteer/README.rst b/volunteer/README.rst index 76a64437e..df967dfc2 100644 --- a/volunteer/README.rst +++ b/volunteer/README.rst @@ -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 ========= @@ -17,7 +13,7 @@ Volunteer .. |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 diff --git a/volunteer/__manifest__.py b/volunteer/__manifest__.py index edbc1638e..4b9a57cbd 100644 --- a/volunteer/__manifest__.py +++ b/volunteer/__manifest__.py @@ -24,6 +24,7 @@ "views/volunteer_shift_generator_views.xml", "views/volunteer_shift_kanban_views.xml", "views/volunteer_shift_participation_views.xml", + "views/volunteer_shift_generator_kanban_views.xml", "views/volunteer_shift_subscription_views.xml", "views/volunteer_shift_category_views.xml", "views/volunteer_shift_type_views.xml", diff --git a/volunteer/demo/volunteer_shift_demo.xml b/volunteer/demo/volunteer_shift_demo.xml index 249cbaa59..b0518c9b9 100644 --- a/volunteer/demo/volunteer_shift_demo.xml +++ b/volunteer/demo/volunteer_shift_demo.xml @@ -5,117 +5,90 @@ SPDX-FileCopyrightText: 2025 Coop IT Easy SC SPDX-License-Identifier: AGPL-3.0-or-later --> - - Shift Today + + Cheese cutting 2 - - - + + + - + - - Shift Tomorrow + + Delicatessen cutting 3 + + + + - - - - - - Shift Next 7 days + + Thursday closing 3 - - + + - + - - Shift Next 30 days + + Friday closing 9 - + - + - - Shift Yesterday + + Store opening 3 - - - + + + - + - - Shift Last 7 days + + Cheese cutting 3 - - - + + + - - Shift Last year + + Delicatessen cutting 3 - - - - + + + + diff --git a/volunteer/demo/volunteer_shift_participation_demo.xml b/volunteer/demo/volunteer_shift_participation_demo.xml index c855adde8..d002374c4 100644 --- a/volunteer/demo/volunteer_shift_participation_demo.xml +++ b/volunteer/demo/volunteer_shift_participation_demo.xml @@ -9,45 +9,48 @@ SPDX-License-Identifier: AGPL-3.0-or-later id="volunteer_shift_participation_demo_a" model="volunteer.shift.participation" > - - + + - - + + - - + + - - + + - - - + + + - - + + canceled @@ -55,23 +58,23 @@ SPDX-License-Identifier: AGPL-3.0-or-later id="volunteer_shift_participation_demo_g" model="volunteer.shift.participation" > - - + + - - + + - - + + diff --git a/volunteer/demo/volunteer_shift_recurrent_generator_demo.xml b/volunteer/demo/volunteer_shift_recurrent_generator_demo.xml index 832f4f740..7839b82a9 100644 --- a/volunteer/demo/volunteer_shift_recurrent_generator_demo.xml +++ b/volunteer/demo/volunteer_shift_recurrent_generator_demo.xml @@ -5,24 +5,104 @@ SPDX-FileCopyrightText: 2025 Coop IT Easy SC SPDX-License-Identifier: AGPL-3.0-or-later --> - - Store Opening - 5 + Friday opening + 3 days 1 - draft + confirmed + + + Europe/Brussels + + + + Thursday closing + 3 + + + weeks + 1 + draft + + + + Europe/Brussels + + + + Saturday opening + 3 + + + weeks + 2 + canceled + + + + Europe/Brussels + + + + Cheese cutting + 2 + + + months + 1 + + confirmed + + Europe/Brussels diff --git a/volunteer/demo/volunteer_shift_recurrent_subscription_demo.xml b/volunteer/demo/volunteer_shift_recurrent_subscription_demo.xml index 4c598e0c0..0dba8f6a2 100644 --- a/volunteer/demo/volunteer_shift_recurrent_subscription_demo.xml +++ b/volunteer/demo/volunteer_shift_recurrent_subscription_demo.xml @@ -11,12 +11,9 @@ SPDX-License-Identifier: AGPL-3.0-or-later model="volunteer.shift.recurrent.subscription" > - - - + + + @@ -25,15 +22,8 @@ SPDX-License-Identifier: AGPL-3.0-or-later model="volunteer.shift.recurrent.subscription" > - - - + + - - - + + + - - - + + + diff --git a/volunteer/demo/volunteer_shift_tag_demo.xml b/volunteer/demo/volunteer_shift_tag_demo.xml index 093ee6155..1874a5f83 100644 --- a/volunteer/demo/volunteer_shift_tag_demo.xml +++ b/volunteer/demo/volunteer_shift_tag_demo.xml @@ -5,23 +5,18 @@ SPDX-FileCopyrightText: 2025 Coop IT Easy SC SPDX-License-Identifier: AGPL-3.0-or-later --> - - Tag A - Shift Tag A + + Fresh + Fresh product reception - - Tag B - Shift Tag B + + Physical + Physical work - - Tag C - Shift Tag C - - - - Tag D - Shift Tag D + + Lifting + Heavy lifting diff --git a/volunteer/demo/volunteer_volunteer_demo.xml b/volunteer/demo/volunteer_volunteer_demo.xml index 14f7e105b..cdb292621 100644 --- a/volunteer/demo/volunteer_volunteer_demo.xml +++ b/volunteer/demo/volunteer_volunteer_demo.xml @@ -5,54 +5,6 @@ SPDX-FileCopyrightText: 2025 Coop IT Easy SC SPDX-License-Identifier: AGPL-3.0-or-later --> - - Volunteer A - 123 exemple street - 1190 - Forest - - 123456789 - vol_a@exemple.com - - - - - - - - Volunteer B - 456 exemple street - 1050 - Ixelles - - 987654321 - vol_b@exemple.com - - - - - - - - Volunteer C - 789 exemple street - 1000 - Bruxelles - - 234567891 - vol_c@exemple.com - - - - - - John Leclair 78 chaussée de Wavre @@ -77,6 +29,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later + diff --git a/volunteer/models/volunteer_shift_recurrent_generator.py b/volunteer/models/volunteer_shift_recurrent_generator.py index 005851b24..5e493de8a 100644 --- a/volunteer/models/volunteer_shift_recurrent_generator.py +++ b/volunteer/models/volunteer_shift_recurrent_generator.py @@ -115,7 +115,9 @@ def create(self, vals_list): generators = super().create(vals_list) for generator in generators: # Prevent creating generators directly in canceled state - if generator.state == "canceled": + if generator.state == "canceled" and not self.env.context.get( + "install_mode" + ): raise UserError(_("A generator cannot be created in canceled state.")) if generator.state == "confirmed": generator._generate_shifts() diff --git a/volunteer/static/description/index.html b/volunteer/static/description/index.html index 1c62417c2..19816561c 100644 --- a/volunteer/static/description/index.html +++ b/volunteer/static/description/index.html @@ -367,7 +367,7 @@

Volunteer

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:2c4ff1c3658233c0e9aa90186f78d0bdfbe78f6d01f34f33fb87ef016d5705dd +!! source digest: sha256:34c9b39997cef7826b4714c8d01254e77800ff020fa817e391e9e1b8a6118bc2 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: AGPL-3 beescoop/Obeesdoo

Generate and manage shifts for volunteers.

diff --git a/volunteer/static/src/scss/volunteer_shift.scss b/volunteer/static/src/scss/volunteer_shift.scss index c4a534f64..1d6fa1b3d 100644 --- a/volunteer/static/src/scss/volunteer_shift.scss +++ b/volunteer/static/src/scss/volunteer_shift.scss @@ -1,4 +1,23 @@ .o_kanban_view { + .o_volunteer_recurrence_header { + font-weight: bold; + font-size: 1.25rem; + } + .o_volunteer_state_canceled, + .o_volunteer_state_confirmed, + .o_volunteer_state_draft { + color: white; + } + .o_volunteer_state_canceled { + background-color: red; + opacity: 0.4; + } + .o_volunteer_state_confirmed { + background-color: #dc3545; + } + .o_volunteer_state_draft { + background-color: grey; + } .o_kanban_content { .o_volunteer_bold { font-weight: bold; @@ -9,6 +28,12 @@ .o_volunteer_fontsize_11 { font-size: 1.1rem; } + .o_volunteer_fontsize_12 { + font-size: 1.25rem; + } + .o_volunteer_fontsize_14 { + font-size: 1.4rem; + } .o_volunteer_fontsize_17 { font-size: 1.75rem; } diff --git a/volunteer/views/volunteer_shift_generator_kanban_views.xml b/volunteer/views/volunteer_shift_generator_kanban_views.xml new file mode 100644 index 000000000..48a9ea9e5 --- /dev/null +++ b/volunteer/views/volunteer_shift_generator_kanban_views.xml @@ -0,0 +1,180 @@ + + + + + Generator Kanban + volunteer.shift.recurrent.generator + + + + + + + + + + + + + + + + + +
+ + + +
+ Each + + + + + + + +
+
+
+ +
+ +
+
+
+
+ +
+
+ + + + + +
+ +
+
+ + +
+ +
+
+
+
+ +
+ + + +
+
+
+ +
+
+ +
+ + +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ +
+
+
+
+
+
+ + + + + + diff --git a/volunteer/views/volunteer_shift_generator_views.xml b/volunteer/views/volunteer_shift_generator_views.xml index dc7ab4407..a97b520c5 100644 --- a/volunteer/views/volunteer_shift_generator_views.xml +++ b/volunteer/views/volunteer_shift_generator_views.xml @@ -189,9 +189,107 @@ SPDX-License-Identifier: AGPL-3.0-or-later + + volunteer.shift.recurrent.generator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Shift Generator volunteer.shift.recurrent.generator - tree,form + {"search_default_filter_confirmed": 1} + kanban,tree,form diff --git a/volunteer/views/volunteer_shift_kanban_views.xml b/volunteer/views/volunteer_shift_kanban_views.xml index 4d11932e2..6d760e190 100644 --- a/volunteer/views/volunteer_shift_kanban_views.xml +++ b/volunteer/views/volunteer_shift_kanban_views.xml @@ -46,14 +46,6 @@ SPDX-License-Identifier: AGPL-3.0-or-later t-out="luxon.DateTime.fromISO(record.start_time.raw_value).toFormat('HH:mm')" />
- -
Full
Empty
-
+
-
-
-
-
Regular -
+
+
+
+
+
Regular