Skip to content

Commit 466444c

Browse files
committed
[ADD] Add warning and replace _notify_progress to _commit_progress
1 parent 9dbc566 commit 466444c

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
2+
3+
from odoo_module_migrate.base_migration_script import BaseMigrationScript
4+
5+
6+
class MigrationScript(BaseMigrationScript):
7+
pass
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.py:
2+
# Limited automatic migration from _notify_progress to _commit_progress
3+
# Only simple cases - See warnings for complex cases
4+
_notify_progress\(done=1\): _commit_progress(processed=1)
5+
_notify_progress\(done=1,\s*remaining=[^)]+\): _commit_progress(processed=1)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.py:
2+
_notify_progress: "[19] _notify_progress is deprecated. Use _commit_progress instead. The new API has different signatures: _commit_progress(processed=N) or _commit_progress(processed=N, remaining=M). In some cases, you may need to add conditional logic 'if self.env.get(\"ir_cron\"):'. Examples: https://github.com/odoo/odoo/pull/207082/commits"

0 commit comments

Comments
 (0)