Skip to content

[18.0][FIX]sale_stock_available_to_promise_release: Fix availability status#29

Merged
OCA-git-bot merged 1 commit into
OCA:18.0from
camptocamp:18.0-fix_availability_status
Jul 10, 2026
Merged

[18.0][FIX]sale_stock_available_to_promise_release: Fix availability status#29
OCA-git-bot merged 1 commit into
OCA:18.0from
camptocamp:18.0-fix_availability_status

Conversation

@mmequignon

Copy link
Copy Markdown
Member

When computing availability status, cancelled moves should be ignored.

ping @jbaudoux

@jbaudoux jbaudoux left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

better but still doesn't look right

Comment thread sale_stock_available_to_promise_release/models/sale_order_line.py Outdated
@mmequignon
mmequignon force-pushed the 18.0-fix_availability_status branch from b4348a7 to deb007b Compare October 13, 2025 15:07
available_qty += product.uom_id._compute_quantity(
move.quantity, move.product_uom, rounding_method="HALF-UP"
)
available_qty = self.product_uom._compute_quantity(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you refactor a bit to not convert twice?

@mmequignon
mmequignon force-pushed the 18.0-fix_availability_status branch from deb007b to 86194a8 Compare December 19, 2025 10:14
@mmequignon

Copy link
Copy Markdown
Member Author

@jbaudoux addressed your comment, can you please make another pass ?

@jbaudoux jbaudoux left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The SO line uom should be the to_unit and not the from unit isn't it?

Comment thread sale_stock_available_to_promise_release/models/sale_order_line.py
Comment thread sale_stock_available_to_promise_release/models/sale_order_line.py
Comment thread sale_stock_available_to_promise_release/models/sale_order_line.py Outdated
Comment thread sale_stock_available_to_promise_release/models/sale_order_line.py Outdated
@OCA-git-bot OCA-git-bot added series:18.0 mod:sale_stock_available_to_promise_release Module sale_stock_available_to_promise_release labels Jul 9, 2026
@mmequignon
mmequignon force-pushed the 18.0-fix_availability_status branch from cb753f2 to 5506947 Compare July 9, 2026 09:52
@mmequignon
mmequignon force-pushed the 18.0-fix_availability_status branch from 5506947 to 8c1d3a1 Compare July 10, 2026 08:19
@jbaudoux

Copy link
Copy Markdown
Contributor

/ocabot merge patch

@OCA-git-bot

Copy link
Copy Markdown
Contributor

On my way to merge this fine PR!
Prepared branch 18.0-ocabot-merge-pr-29-by-jbaudoux-bump-patch, awaiting test results.

@OCA-git-bot
OCA-git-bot merged commit d93604c into OCA:18.0 Jul 10, 2026
5 of 7 checks passed
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 8e31b54. Thanks a lot for contributing to OCA. ❤️

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.

5 participants