Skip to content

[IMP] pms: add active field to room.closure.reason#401

Merged
DarioLodeiros merged 1 commit into
OCA:16.0from
commitsun:16.0-add-active-room-closure-reason
May 25, 2026
Merged

[IMP] pms: add active field to room.closure.reason#401
DarioLodeiros merged 1 commit into
OCA:16.0from
commitsun:16.0-add-active-room-closure-reason

Conversation

@DarioLodeiros
Copy link
Copy Markdown
Member

Summary

  • Add active Boolean field (default True) to room.closure.reason so reasons that are no longer in use can be archived without losing the link from historical records that already reference them.
  • Show the standard "Archived" ribbon on the form when the record is archived.
  • Add a dedicated search view with an "Archived" filter and wire it to the configuration menu action.

Motivation

Operations teams cycle through closure reason catalogues fairly often (renaming, splitting categories, etc.). Without active, obsolete reasons stay visible in selection dropdowns forever and the only workaround is to delete them, which is not possible once historical closures reference them.

Test plan

  • Existing closure reasons are kept active=True after the module update (default on the new column).
  • Form view shows the "Archived" ribbon when toggled off and hides it when active.
  • The "Archived" filter under the dedicated menu lists archived reasons.
  • Selection dropdowns on pms.reservation / out-of-service flows no longer include archived reasons by default.

Allow archiving room closure reasons that are no longer in use.
Historical records that already reference an archived reason keep the
link; the reason simply stops appearing in selection dropdowns for new
closures.

The form view exposes the standard "Archived" ribbon and a dedicated
search view adds an "Archived" filter, wired to the menu action so it
is reachable from the configuration menu.
@DarioLodeiros DarioLodeiros merged commit 4de0c56 into OCA:16.0 May 25, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants