Skip to content

[18.0][IMP] rma: allow to confirm picking without rma access rights - #613

Open
twalter-c2c wants to merge 1 commit into
OCA:18.0from
camptocamp:confirm-picking-wo-rma-acl
Open

[18.0][IMP] rma: allow to confirm picking without rma access rights#613
twalter-c2c wants to merge 1 commit into
OCA:18.0from
camptocamp:confirm-picking-wo-rma-acl

Conversation

@twalter-c2c

@twalter-c2c twalter-c2c commented Jul 22, 2026

Copy link
Copy Markdown

When RMA is installed, stock users without read access on rma model can hit an access error while confirming pickings, even if they never use RMA directly.

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Hi @pedrobaeza, @chienandalu,
some modules you are maintaining are being modified, check this out!

Comment thread rma/models/stock_move.py Outdated
@twalter-c2c
twalter-c2c force-pushed the confirm-picking-wo-rma-acl branch from de52196 to 31d7ff6 Compare July 23, 2026 16:51
@twalter-c2c
twalter-c2c marked this pull request as ready for review July 23, 2026 16:52
@twalter-c2c twalter-c2c changed the title [IMP] rma: allow to confirm picking without rma access rights [18.0] [IMP] rma: allow to confirm picking without rma access rights Jul 23, 2026
@twalter-c2c twalter-c2c changed the title [18.0] [IMP] rma: allow to confirm picking without rma access rights [18.0][IMP] rma: allow to confirm picking without rma access rights Jul 23, 2026

@grindtildeath grindtildeath 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.

Pre approving, LG

Comment thread rma/models/stock_move.py Outdated
@victoralmau

Copy link
Copy Markdown
Member

Another approach to fix the same problem: #614

@twalter-c2c
twalter-c2c force-pushed the confirm-picking-wo-rma-acl branch from 31d7ff6 to 28a4e75 Compare July 24, 2026 11:16
@twalter-c2c

Copy link
Copy Markdown
Author

Another approach to fix the same problem: #614

It is difficult to say which approach should be used. I would appreciate @pedrobaeza's opinion on that.

@pedrobaeza pedrobaeza added this to the 18.0 milestone Jul 24, 2026
@pedrobaeza

Copy link
Copy Markdown
Member

Yes, I'm asking for just the sudo in #614, so I think this one seems correct. Not seen both tests to see which one is more focused and concise for the exact problem though.

@victoralmau

Copy link
Copy Markdown
Member

Personally, I don't like this solution, because even though it works (that method is always called with sudo()), it simply hides the real problem (if the user call the action doesn't have access to one of the fields, an error occurs), which happens in this case with RMA but could happen with others as well (I'll try to check if there are any similar cases, for example, with mrp).

@pedrobaeza

Copy link
Copy Markdown
Member

@victoralmau I think this solution is acceptable. There's no hiding at all, as we just want to confirm the picking without errors. Is there any drawback that I'm not seeing?

@victoralmau

Copy link
Copy Markdown
Member

@victoralmau I think this solution is acceptable. There's no hiding at all, as we just want to confirm the picking without errors. Is there any drawback that I'm not seeing?

The solution is correct; we'll simply be applying sudo() to all those moves, and while that might have some side effects, I don't think they'll be significant.

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.

5 participants