Skip to content

[18.0][ADD] maintenance_request_done_readonly - #578

Open
smorita7749 wants to merge 1 commit into
OCA:18.0from
qrtl:18.0-add-maintenance-request-done-readonly
Open

smorita7749 wants to merge 1 commit into
OCA:18.0from
qrtl:18.0-add-maintenance-request-done-readonly

Conversation

@smorita7749

Copy link
Copy Markdown

This module adds the restriction for editing by general users after maintenance.request is completed and allows only maintenance manager to edit it.

@qrtl QT6788

@OCA-git-bot OCA-git-bot added series:18.0 mod:maintenance_request_done_readonly Module maintenance_request_done_readonly labels Jul 23, 2026
@smorita7749
smorita7749 force-pushed the 18.0-add-maintenance-request-done-readonly branch 2 times, most recently from 8c7ac8c to 592c3b3 Compare July 23, 2026 05:30
@smorita7749
smorita7749 marked this pull request as draft July 23, 2026 06:33
@smorita7749
smorita7749 force-pushed the 18.0-add-maintenance-request-done-readonly branch 6 times, most recently from 833a3ad to bfebc91 Compare July 23, 2026 12:26
@smorita7749
smorita7749 marked this pull request as ready for review July 23, 2026 14:43
Comment thread maintenance_request_done_readonly/models/res_config_settings.py Outdated
@smorita7749
smorita7749 force-pushed the 18.0-add-maintenance-request-done-readonly branch 2 times, most recently from 5ea1730 to 4807f51 Compare July 26, 2026 23:28
Comment thread maintenance_request_done_readonly/models/maintenance_request.py Outdated
@smorita7749
smorita7749 force-pushed the 18.0-add-maintenance-request-done-readonly branch from 4807f51 to 2211a1b Compare July 27, 2026 14:34
Comment thread maintenance_request_done_readonly/models/maintenance_request.py
@smorita7749
smorita7749 force-pushed the 18.0-add-maintenance-request-done-readonly branch from 2211a1b to 8f220c4 Compare July 29, 2026 10:04

@AungKoKoLin1997 AungKoKoLin1997 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review: LGTM

Comment thread maintenance_request_done_readonly/readme/DESCRIPTION.md Outdated
@smorita7749
smorita7749 force-pushed the 18.0-add-maintenance-request-done-readonly branch from 8f220c4 to 64b299f Compare August 5, 2026 02:30
Comment thread maintenance_request_done_readonly/security/res_groups.xml Outdated
Comment thread maintenance_request_done_readonly/security/res_groups.xml Outdated
Comment thread maintenance_request_done_readonly/security/res_groups.xml Outdated
@smorita7749
smorita7749 force-pushed the 18.0-add-maintenance-request-done-readonly branch 2 times, most recently from 45b0053 to 8f596d9 Compare August 5, 2026 05:49

@AungKoKoLin1997 AungKoKoLin1997 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@BhaveshHeliconia BhaveshHeliconia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code and functional review LGTM!

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

1 similar comment
@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

<record id="maintenance.group_equipment_manager" model="res.groups">
<field
name="implied_ids"
eval="[(4, ref('group_maintenance_request_edit_done'))]"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use Command.link

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please check if we should add @api.ondelete method to block unlink operations on done requests.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is necessary.
I changed to only the Maintenance: Edit Completed Requests group can delete done requests.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add yourself as a maintainer.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@smorita7749
smorita7749 force-pushed the 18.0-add-maintenance-request-done-readonly branch from 8f596d9 to dab3cc7 Compare September 24, 2026 03:22
@smorita7749

Copy link
Copy Markdown
Author

What I changed:

  • Use Command.link in security/res_groups.xml.
  • Add _unlink_except_done to block deleting completed requests for users outside the edit group, with tests.
  • Add myself as a maintainer.

@smorita7749
smorita7749 force-pushed the 18.0-add-maintenance-request-done-readonly branch from dab3cc7 to 95c4fa8 Compare September 24, 2026 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants