Issue:
Imported module is not able to search existing static files to replace them
Cause:
After changing the new loc calculation, ir.attachment will link to the
ir.model.data. However, those attachments will not able to search anymore
without sudo. Therefore, the system will try to create the attachment again.
It will return error because constraint "ir_model_data_module_name_uniq_index"
will prevent ir.model.data to create again.
Solution:
Use sudo to search the attachment.
closesodoo/odoo#93752
X-original-commit: 8f604847eb1ec96955ee724ad7b882c74160b9d7
Signed-off-by: Vincent Schippefilt (vsc) <vsc@odoo.com>