Skip to content

[18.0][FIX] dms_field: Call the sanitizeDMSModel() method to obtain the appropriate model - #504

Merged
OCA-git-bot merged 1 commit into
OCA:18.0from
Tecnativa:18.0-fix-dms_field-TT64085
Aug 11, 2026
Merged

[18.0][FIX] dms_field: Call the sanitizeDMSModel() method to obtain the appropriate model#504
OCA-git-bot merged 1 commit into
OCA:18.0from
Tecnativa:18.0-fix-dms_field-TT64085

Conversation

@victoralmau

Copy link
Copy Markdown
Member

Call the sanitizeDMSModel() method to obtain the appropriate model

Use case example: hr_dms_field

Related to #496

Please @pedrobaeza and @CarlosRoca13 can you review it?

@Tecnativa TT64085

…ropriate model

Use case example: hr_dms_field

Related to OCA#496

TT64085
@OCA-git-bot

Copy link
Copy Markdown
Contributor

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

@pedrobaeza pedrobaeza added this to the 18.0 milestone Aug 11, 2026
@pedrobaeza

Copy link
Copy Markdown
Member

What sanitizeDMSModel does? Can you explain the problem? Which value returns before and after, for example.

@victoralmau

Copy link
Copy Markdown
Member Author

What sanitizeDMSModel does? Can you explain the problem? Which value returns before and after, for example.

Returns the “correct” model, which is used in hr_dms_field https://github.com/OCA/dms/blob/6da958550a511dfa382c1f4208d6024adb4a5d95/hr_dms_field/static/src/js/base/ dms_list_controller.esm.js#L12 to return hr.employee when a user with lower permissions is accessing their own employee (hr.employee.public).

The sanitizeDMSModel() method is already used elsewhere in the code.

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

It makes sense
👍 Thanks

@pedrobaeza pedrobaeza left a comment

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.

Thanks for the explanation. Please put that info in the commit and PR comment next time from the beginning for being able to judge correctly and for future references.

For this one, let's not block it.

/ocabot merge patch

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 18.0-ocabot-merge-pr-504-by-pedrobaeza-bump-patch, awaiting test results.

@OCA-git-bot
OCA-git-bot merged commit ba7d6fb into OCA:18.0 Aug 11, 2026
7 checks passed
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 5332880. Thanks a lot for contributing to OCA. ❤️

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