[19.0][MIG] database_cleanup: Migration to 19.0 - #3453
Conversation
avoid ''NoneType' object has no attribute 'exists'' error when purging models fix my change guewen.baconnier@camptocamp.com-20140203103254-v1mzu2uib047xb9h, wrong lines replaced...
raw SQL query (but never read afterwards). Workaround for
lp:1277899
[FIX] Preserve dangling workflow table which is in use
[RFR] Group models per table when detecting columns to purge
to prevent problems with models sharing the same table
[ADD] Allow purging of dangling data entries
[FIX] Data purging now working
[IMP] Docstrings
[FIX] Label
[FIX] Catch attempt to unlink field from nonexisting model
[RFR] Flake8
[CHG] database_cleanup: move description to README.rst
[IMP] order wizard lines by name [IMP] deal with modules whose models can't be loaded [IMP] double quotes for docstring [FIX] use exists query instead of huge in list [IMP] hide unnecessary buttons in wizard II [IMP] readability [FIX] cope with purging nonexisting models
[IMP] adaptto upstream changes
[ADD] test purging modules [ADD] test purging tables
[FIX] database_cleanup reloads the registry which has weird side effects during testing. Take care database_cleanup's tests don't mess up the following tests
* [FIX] database_cleanup: Isolate build * Isolate `database_cleanup` into its own build in Travis file to fix OCA#689 * [FIX] database_cleanup: Remove KeyError assertion * Remove KeyError assertion in tests due to PR in comment being merged
* [ADD] allow creating missing indexes * [FIX] tests; installation * [ADD] allow purging properties * [ADD] missing file * [ADD] test purging properties * [ADD] missing parent_id for menu entry * [FIX] don't delete too many and wrong properties
Using new base model inheritance.
[FIX] don't try to uninstall uninstalled modules [DEL] weird code [FIX] actually cleanup where we can
Update version number Use correct import Update .pot to match new syntax Adapt icon to fontawesome Add models description Rename field external id to new syntax <model>__<field>
cf discussion on OCA#1408
To match the new database_cleanup.pot
Following odoo/odoo@54238c88e85d6e a Many2many may have no relation This avoids having a None record in the list (which is problematic with the NOT IN clause) https://wiki.postgresql.org/wiki/Don't_Do_This#Don.27t_use_NOT_IN
Currently translated at 100.0% (75 of 75 strings) Translation: server-tools-18.0/server-tools-18.0-database_cleanup Translate-URL: https://translation.odoo-community.org/projects/server-tools-18-0/server-tools-18-0-database_cleanup/it/
|
Hi @bizzappdev, |
|
We are working on the migration. And almost everything is migrated. |
|
@nicomacr modules is migrated and ready for the review. |
twalter-c2c
left a comment
There was a problem hiding this comment.
Looks good in general. I am about to test the module functionally. I noticed that you did some refactoring - you moved code blocks for each model to a dedicated file, thank you for that. However, I would really appreciate it if you could keep the refactoring in a separate commit to ease reviewing the migration changes.
| yield env | ||
|
|
||
|
|
||
| # Use post_install to get all models loaded more info: odoo/odoo#13458 |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
|
|
||
|
|
||
| class TestIdentifierAdapter(TransactionCase): | ||
| class TestIdentifierAdapter(BaseCommon): |
There was a problem hiding this comment.
Is there a need to use the BaseCommon here? Maybe you can make use of disabling tracking: cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True)) as advised here instead? I believe that disabled tracking is recommended for all tests.
|
It would be great if you could rebase on top of this PR #3273 since it got merged. |
instead of 'Purge this model' everywhere.
Currently translated at 100.0% (75 of 75 strings) Translation: server-tools-18.0/server-tools-18.0-database_cleanup Translate-URL: https://translation.odoo-community.org/projects/server-tools-18-0/server-tools-18-0-database_cleanup/de/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: server-tools-18.0/server-tools-18.0-database_cleanup Translate-URL: https://translation.odoo-community.org/projects/server-tools-18-0/server-tools-18-0-database_cleanup/
73135f2 to
9a5810d
Compare
twalter-c2c
left a comment
There was a problem hiding this comment.
Thank you for the updates. It looks good now.
|
This PR has the |
|
/ocabot merge nobump |
|
This PR looks fantastic, let's merge it! |
|
Congratulations, your PR was merged at cb60ff7. Thanks a lot for contributing to OCA. ❤️ |
No description provided.