From 3f74ea586fb20856ff1328ee3c653245684fd24a Mon Sep 17 00:00:00 2001 From: Carmen Bianca Bakker Date: Mon, 23 May 2022 09:47:17 +0200 Subject: [PATCH 1/5] [FIX] beesdoo_shift: Check working mode as well as shift_id Previously the error would be shown when changing a regular worker to an irregular worker, because the `shift_id` field was not erased. Signed-off-by: Carmen Bianca Bakker --- beesdoo_shift/wizard/subscribe.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/beesdoo_shift/wizard/subscribe.py b/beesdoo_shift/wizard/subscribe.py index beb708f95..c40d8e3ba 100644 --- a/beesdoo_shift/wizard/subscribe.py +++ b/beesdoo_shift/wizard/subscribe.py @@ -138,7 +138,11 @@ def unsubscribe(self): @api.multi def subscribe(self): self = self._check() - if self.shift_id and self.shift_id.remaining_worker <= 0: + if ( + self.shift_id + and self.working_mode == "regular" + and self.shift_id.remaining_worker <= 0 + ): raise UserError(_("There is no remaining spot in this shift")) # cleanup previous shift template subscriptions From f416a46a9b1bc71e09c9b86e43cb3827a771f2cc Mon Sep 17 00:00:00 2001 From: Carmen Bianca Bakker Date: Mon, 23 May 2022 11:44:26 +0200 Subject: [PATCH 2/5] [ADD] beesdoo_shift: Change log entry Signed-off-by: Carmen Bianca Bakker --- beesdoo_shift/readme/newsfragments/390.bugfix.rst | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 beesdoo_shift/readme/newsfragments/390.bugfix.rst diff --git a/beesdoo_shift/readme/newsfragments/390.bugfix.rst b/beesdoo_shift/readme/newsfragments/390.bugfix.rst new file mode 100644 index 000000000..3dccf5262 --- /dev/null +++ b/beesdoo_shift/readme/newsfragments/390.bugfix.rst @@ -0,0 +1,2 @@ +When changing a regular worker to an irregular worker via the wizard, no longer +give an error when their (former) shift is full. From a67662352f15bb9913c09027e14e288dd8536c6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Taymans?= Date: Thu, 26 May 2022 17:36:12 +0200 Subject: [PATCH 3/5] beesdoo_shift 12.0.1.1.4 --- beesdoo_shift/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beesdoo_shift/__manifest__.py b/beesdoo_shift/__manifest__.py index ccae21128..9c9c75167 100644 --- a/beesdoo_shift/__manifest__.py +++ b/beesdoo_shift/__manifest__.py @@ -9,7 +9,7 @@ "author": "Thibault Francois, Elouan Le Bars, Coop IT Easy SCRLfs", "website": "https://github.com/beescoop/Obeesdoo", "category": "Cooperative management", - "version": "12.0.1.1.3", + "version": "12.0.1.1.4", "depends": ["mail"], "data": [ "data/system_parameter.xml", From 544fd9de3faaeb64c9cc718e1914534bf8e9e391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Taymans?= Date: Thu, 26 May 2022 17:40:32 +0200 Subject: [PATCH 4/5] [UPD] changelog --- beesdoo_shift/readme/HISTORY.rst | 7 +++++++ beesdoo_shift/readme/newsfragments/390.bugfix.rst | 2 -- 2 files changed, 7 insertions(+), 2 deletions(-) delete mode 100644 beesdoo_shift/readme/newsfragments/390.bugfix.rst diff --git a/beesdoo_shift/readme/HISTORY.rst b/beesdoo_shift/readme/HISTORY.rst index c93561da4..7d480c953 100644 --- a/beesdoo_shift/readme/HISTORY.rst +++ b/beesdoo_shift/readme/HISTORY.rst @@ -1,3 +1,10 @@ +12.0.1.1.4 (2022-05-26) +**Bugfixes** + +- When changing a regular worker to an irregular worker via the wizard, no longer + give an error when their (former) shift is full. (`#390 `_) + + 12.0.1.1.1 (2022-05-26) **Bugfixes** diff --git a/beesdoo_shift/readme/newsfragments/390.bugfix.rst b/beesdoo_shift/readme/newsfragments/390.bugfix.rst deleted file mode 100644 index 3dccf5262..000000000 --- a/beesdoo_shift/readme/newsfragments/390.bugfix.rst +++ /dev/null @@ -1,2 +0,0 @@ -When changing a regular worker to an irregular worker via the wizard, no longer -give an error when their (former) shift is full. From 481562ad5a5041781349eb12b51585396b73ab00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Taymans?= Date: Thu, 26 May 2022 18:45:56 +0200 Subject: [PATCH 5/5] [UPD] README.rst --- beesdoo_shift/README.rst | 7 +++++ beesdoo_shift/static/description/index.html | 34 ++++++++++++--------- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/beesdoo_shift/README.rst b/beesdoo_shift/README.rst index f6b85503b..db84096dc 100644 --- a/beesdoo_shift/README.rst +++ b/beesdoo_shift/README.rst @@ -47,6 +47,13 @@ Configuration Changelog ========= +12.0.1.1.4 (2022-05-26) +**Bugfixes** + +- When changing a regular worker to an irregular worker via the wizard, no longer + give an error when their (former) shift is full. (`#390 `_) + + 12.0.1.1.1 (2022-05-26) **Bugfixes** diff --git a/beesdoo_shift/static/description/index.html b/beesdoo_shift/static/description/index.html index 1a2bccd2d..effa9dc64 100644 --- a/beesdoo_shift/static/description/index.html +++ b/beesdoo_shift/static/description/index.html @@ -372,19 +372,19 @@

Beescoop Shift Management

Table of contents

-

Configuration

+

Configuration

  • Translate cooperative status selection field, the terms to translate are:
-

Changelog

+

Changelog

+

12.0.1.1.4 (2022-05-26) +Bugfixes

+
    +
  • When changing a regular worker to an irregular worker via the wizard, no longer +give an error when their (former) shift is full. (#390)
  • +

12.0.1.1.1 (2022-05-26) Bugfixes

-

Bug Tracker

+

Bug Tracker

Bugs are tracked on GitHub 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 @@ -421,9 +427,9 @@

Bug Tracker

Do not contact contributors directly about support or help with technical issues.

-

Credits

+

Credits

-

Authors

+

Authors

  • Thibault Francois
  • Elouan Le Bars
  • @@ -431,14 +437,14 @@

    Authors

-

Contributors

+

Contributors

  • Beescoop - Cellule IT
  • Coop IT Easy SCRLfs
-

Maintainers

+

Maintainers

This module is part of the beescoop/obeesdoo project on GitHub.

You are welcome to contribute.