Correct commit https://github.com/odoo/odoo/commit/a9366de8f90ea4106d306c585043a42f089c86d4 Indeed some attachments may not have a datas_fname field, like URL attachments created before saas-11.4 and theme attachments from 12.0. Closes https://github.com/odoo/odoo/pull/27610