odoo/upgrade#8047

Created by Upgrade, Carsten Wolff (cawo)
Merged at e3a0f8924877efb264e4620bd10492f0de83e214

Statuses:

Linked pull requests
label
odoo-dev:master-imp_make_pickleable_callback_preserve_same_file-cawo
head
225669a97f5fa3012b39ea6fa800b8e8a11159a3
merged
2 days ago by Upgrade, Christophe Simonis (chs)
odoo/upgrade odoo/upgrade-util
master #8047 #295

[IMP] *: use util.make_pickleable_callback where applicable

Avoid copy and pasted code and its lengthy comment in multiple places. Use a helper function from util instead.

Needs odoo/upgrade-util#295 for import from util.misc and for the possibility to re-use the module when calling the helper multiple times from the same file.

For a PR that adds a new upgrade script (for the Odoo's master branch or one of the RR versions):
- [x] I've added the references to the upgrade-util PR in the commit message, even if they are already merged.
- [x] I've added an overall description of the changes made in the upgrade-util branch.

For a PR that fixes an issue on an already existing upgrade script:
- [ ] I've added a clear description of the issue including information on how to reproduce it.
- [ ] I've tested the fix and included references of upgrade requests where this fix will be applicable in the form of upg-<request_number>.
- [ ] I've included references to the OPW, if applicable, in the form of opw-<ticket_number>.
- [ ] I've tested this fix on other DBs, not just the ones with the issue.

For all PRs:
- [x] My commit's title follows the right format.
- [x] My commit's body includes information about the changes.
- [x] I've added odoo/upgrade as a reviewer.
- [x] I've read and understood this list.
- [x] I will ensure all the CI checks are green.

> Note More info can be found in the wiki.