Sunday, September 20, 2020
1 change · master
Resolved issues and error corrections
This fix ensures that attachments linked to specific fields are included when moving or converting attachment storage. It helps prevent missing files after a storage migration, reducing the risk of incomplete business records.
Original PR description
Description of the issue/feature this PR addresses:
This change is necessary to migrate attachment which are assigned to a field. Otherwise the `_search `method would filter all of those attachments.
```python
if not any(arg[0] in ('id', 'res_field') for arg in args):
args.insert(0, ('res_field', '=', False))
```
Current behavior before PR:
Only attachment not related to a field will be migrated.
Desired behavior after PR is merged:
All attachments are migrated.
@mart-e I had a PR open for this put since the other changes in this PR are not needed anymore I closed it and opened this one.
https://github.com/odoo/odoo/pull/35614
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr