Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][FIX]fieldservice_stage_validation: allow fieldservice manager to change fields #1327

Open
wants to merge 2 commits into
base: 16.0
Choose a base branch
from

Conversation

PicchiSeba
Copy link

@PicchiSeba PicchiSeba commented Feb 21, 2025

In 14.0 a user in the group fieldservice.manager could change the "Field to Validate" in Field Service > Configuration > Stages.

In 16.0 this is not the case anymore, because the group is missing the read permissions on ir.model and ir.model.fields

In this PR we restore read permissions while setting some rules to limit them to the relevant tables only.

@OCA-git-bot
Copy link
Contributor

Hi @max3903, @brian10048,
some modules you are maintaining are being modified, check this out!

@PicchiSeba PicchiSeba changed the title [FIX]fieldservice_stage_validation: allow fieldservice manager to change fields [16.0][FIX]fieldservice_stage_validation: allow fieldservice manager to change fields Feb 21, 2025
@PicchiSeba
Copy link
Author

PicchiSeba commented Feb 21, 2025

question: @max3903 @brian10048 if this PR looks fine to you we should also create a new bridge module between fieldservice_stage_validation and fsm_route to allow the addition of fsm.route to the new ir.rules.

Are you ok with this solution?

@max3903 max3903 added this to the 16.0 milestone Feb 21, 2025
@max3903
Copy link
Member

max3903 commented Feb 21, 2025

question: @max3903 @brian10048 if this PR looks fine to you we should also create a new bridge module between fieldservice_stage_validation and fsm_route to allow the addition of fsm.route to the new ir.rules.

Are you ok with this solution?

Yes

Copy link
Contributor

@aleuffre aleuffre left a comment

Choose a reason for hiding this comment

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

Issue:

Steps to reproduce:

  1. Login as Mitchell Admin
  2. Grant Marc Demo the "Field service: user" access right
  3. Fieldservice -> Configuration -> Stages -> Order -> Confirmed: Add "Actual duration" to "Fields to validate"
  4. Login as Marc Demo
  5. Fieldservice: Drag the "Demo Order" from "New" to "Confirmed"

Access Error

You are not allowed to access 'Fields' (ir.model.fields) records.

This operation is allowed for the following groups:
	- Administration/Access Rights
	- Field Service/Manager

Contact your administrator to request access if necessary.

@PicchiSeba PicchiSeba force-pushed the 16.0-stage-permissions branch from 727036d to d907fc7 Compare February 24, 2025 08:34
@PicchiSeba
Copy link
Author

Issue:

Steps to reproduce:

1. Login as Mitchell Admin

2. Grant Marc Demo the "Field service: user" access right

3. Fieldservice -> Configuration -> Stages -> Order -> Confirmed: Add "Actual duration" to "Fields to validate"

4. Login as Marc Demo

5. Fieldservice: Drag the "Demo Order" from "New" to "Confirmed"

Access Error

You are not allowed to access 'Fields' (ir.model.fields) records.

This operation is allowed for the following groups:
	- Administration/Access Rights
	- Field Service/Manager

Contact your administrator to request access if necessary.

I tested this exact workflow and it works with the latest changes

Copy link
Contributor

@aleuffre aleuffre left a comment

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

@PicchiSeba
Copy link
Author

PicchiSeba commented Feb 24, 2025

I also added the new bridge module with an additional commit

@PicchiSeba PicchiSeba marked this pull request as draft March 7, 2025 13:09
@PicchiSeba PicchiSeba force-pushed the 16.0-stage-permissions branch from 24bf126 to 3812a54 Compare March 7, 2025 14:47
@PicchiSeba PicchiSeba force-pushed the 16.0-stage-permissions branch from 3812a54 to 651537e Compare March 7, 2025 14:54
@PicchiSeba PicchiSeba marked this pull request as ready for review March 7, 2025 14:58
Copy link
Contributor

@aleuffre aleuffre left a comment

Choose a reason for hiding this comment

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

I was too quick to approve, apologies

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.

4 participants