Skip to content

Commit

Permalink
Update l10n_be_national_number/migrations/16.0.2.0.0/pre-migration.py
Browse files Browse the repository at this point in the history
Co-authored-by: hugues de keyzer <[email protected]>
  • Loading branch information
victor-champonnois and huguesdk authored Mar 29, 2024
1 parent 8bc56d5 commit 73e820b
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@

@openupgrade.migrate()
def migrate(env, version):
for id_numbers in env["res.partner"].search([]).mapped("id_numbers"):
for id_numbers in (
env["res.partner"]
.with_context(active_test=False)
.search([])
.mapped("id_numbers")
):
if id_numbers.category_id == env.ref(
"l10n_be_national_number.l10n_be_national_number_category"
):
Expand Down

0 comments on commit 73e820b

Please sign in to comment.