Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADD] sustainability_purchase: product's supplier emission factor preceding order #223

Merged
merged 2 commits into from
Jan 30, 2025

Conversation

jacopobacci
Copy link
Contributor

@jacopobacci jacopobacci added the enhancement New feature or request label Dec 19, 2024
@jacopobacci jacopobacci self-assigned this Dec 19, 2024
@BonnetAdam BonnetAdam assigned BonnetAdam and unassigned jacopobacci Jan 16, 2025
@BonnetAdam BonnetAdam force-pushed the 17.0-carbon-product-supplierinfo branch from ac505b0 to ac9a00f Compare January 16, 2025 14:14
@BonnetAdam BonnetAdam force-pushed the 17.0-carbon-product-supplierinfo branch 6 times, most recently from f0e2310 to a8b461c Compare January 17, 2025 21:07
@BonnetAdam BonnetAdam linked an issue Jan 17, 2025 that may be closed by this pull request
@BonnetAdam BonnetAdam marked this pull request as ready for review January 17, 2025 21:10
@BonnetAdam BonnetAdam force-pushed the 17.0-carbon-product-supplierinfo branch from eff8781 to ef28968 Compare January 24, 2025 09:16
@BonnetAdam BonnetAdam force-pushed the 17.0-carbon-product-supplierinfo branch from ef28968 to 58be404 Compare January 24, 2025 09:17
Copy link
Contributor

@jguenat jguenat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok but we'll need to refactor _compute_carbon_debt because on large database it will cause performance issues.

@@ -98,6 +119,14 @@ def _compute_carbon_is_date_locked(self):
# --------------------------------------------

@api.depends(
# Seller
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not optimized because it triggers recompute on all account.move.line when you change your seller_ids or the product. Same for company lock date.

sustainability_purchase/tests/common.py Outdated Show resolved Hide resolved
sustainability_purchase/tests/test_purchase.py Outdated Show resolved Hide resolved
sustainability/tests/test_action.py Outdated Show resolved Hide resolved
@jguenat
Copy link
Contributor

jguenat commented Jan 30, 2025

/ocabot merge minor

@sustainabilitybot
Copy link
Collaborator

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 17.0-ocabot-merge-pr-223-by-jguenat-bump-minor, awaiting test results.

sustainabilitybot added a commit that referenced this pull request Jan 30, 2025
Signed-off-by jguenat
@jguenat jguenat merged commit 4413ffb into 17.0 Jan 30, 2025
3 checks passed
@jguenat jguenat deleted the 17.0-carbon-product-supplierinfo branch January 30, 2025 10:49
jguenat pushed a commit that referenced this pull request Jan 30, 2025
@BonnetAdam BonnetAdam mentioned this pull request Jan 31, 2025
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Product's supplier emission factor - Change preceeding order mgmt
4 participants