Skip to content

Commit

Permalink
[FIX] sustainability: Fix some things that i've forgotten
Browse files Browse the repository at this point in the history
  • Loading branch information
BonnetAdam committed Jan 8, 2025
1 parent 91cb8b3 commit 7010f8d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions sustainability/migrations/17.0.1.1.2/post-migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ def migrate(cr, registry):
models.remove("res.partner")

for model in models:
if model not in env:
continue
for record in env[model].search(
[
"|",
Expand Down
1 change: 0 additions & 1 deletion sustainability/models/carbon_line_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,6 @@ def _create_origin_lines(self):
lines_to_flush.carbon_origin_ids.unlink()

for line in lines_to_flush:
# line.carbon_origin_ids.unlink()
origin_vals_list.extend(line._get_line_origin_vals_list())

# To avoid empty create calls
Expand Down
1 change: 0 additions & 1 deletion sustainability/models/carbon_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
CARBON_MODELS = [
"carbon.factor",
"product.category",
"",
"product.product",
"product.template",
"res.partner",
Expand Down

0 comments on commit 7010f8d

Please sign in to comment.