server-tools icon indicating copy to clipboard operation
server-tools copied to clipboard

[16.0][FIX] tracking_manager: Avoid error when accessing the value of a field that we do not have access

Open victoralmau opened this issue 1 year ago • 1 comments

Avoid error when accessing the value of a field that we do not have access

Example use case:

  • Install hr_fleet
  • Set the employee_ids field of hr.employee as a tracking field
  • Modify the user to not have permissions in Fleet
  • Modify the name of an employee

Please @pedrobaeza and @chienandalu can you review it?

@Tecnativa TT51160

victoralmau avatar Oct 07 '24 14:10 victoralmau

Hi @Kev-Roche, @sebastienbeau, some modules you are maintaining are being modified, check this out!

OCA-git-bot avatar Oct 07 '24 14:10 OCA-git-bot

Can you add a regression test?

pedrobaeza avatar Oct 08 '24 06:10 pedrobaeza

Can you add a regression test?

I have tried to do it but it is not possible (it is necessary a relationship with one2many that can be created/modified in that model and that some of the fields are limited with groups). I have taken the opportunity to add a test of the use case of https://github.com/OCA/server-tools/pull/3051

victoralmau avatar Oct 08 '24 07:10 victoralmau

On my way to merge this fine PR! Prepared branch 16.0-ocabot-merge-pr-3051-by-pedrobaeza-bump-patch, awaiting test results.

OCA-git-bot avatar Oct 08 '24 07:10 OCA-git-bot

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

OCA-git-bot avatar Oct 08 '24 07:10 OCA-git-bot