odoo/odoo#202275

Created by fw-bot
Merged at 42cc9283f8a0fe9d97bbb9546de1e66adca4f634

Statuses:

label
odoo-dev:18.0-saas-17.4-form_in_dialog_shows_error-jpp-423662-fw
head
f0afbfdfc496a2cadf23cb0917a65b17a0f2ab85
merged
7 months ago by JavaScript, Aaron Bohy (aab)
odoo/odoo
saas-17.4 #202222
18.0 #202275
saas-18.1 #202303
saas-18.2 #202343
saas-18.3
saas-18.4
19.0
master #202371

[FW][FIX] web: access error on dialog form view

  • On a view with a company-dependent field with a many2many_tags widget, where the edit_tags option is set to true;
  • Click on a tag;
  • Change the company;
  • Save the tag;
  • Open the same tag again;

A traceback error is displayed. This error occurs because, since [1], when loading the form view the access errors are handled, the company is added to the selected companies and the record is reloaded. The issue is that this cannot be done with a dialog form view, not only is an unreachable action service function is called, but also the dialog is not reopened when reloading.

In this commit, we fix this by showing the access error.

Forward-Port-Of: #202222