-
-
Notifications
You must be signed in to change notification settings - Fork 17
[18.0][FIX]sale_stock_available_to_promise_release: Fix availability status #29
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
base: 18.0
Are you sure you want to change the base?
Conversation
jbaudoux
left a comment
There was a problem hiding this comment.
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
sale_stock_available_to_promise_release/models/sale_order_line.py
Outdated
Show resolved
Hide resolved
b4348a7 to
deb007b
Compare
| available_qty += product.uom_id._compute_quantity( | ||
| move.quantity, move.product_uom, rounding_method="HALF-UP" | ||
| ) | ||
| available_qty = self.product_uom._compute_quantity( |
There was a problem hiding this comment.
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?
deb007b to
86194a8
Compare
|
@jbaudoux addressed your comment, can you please make another pass ? |
jbaudoux
left a comment
There was a problem hiding this comment.
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?
| continue | ||
| if move.need_release: | ||
| available_qty += self.product_uom._compute_quantity( | ||
| move.ordered_available_to_promise_uom_qty, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
promise_qty instead of promise_uom_qty
When computing availability status, cancelled moves should be ignored.
ping @jbaudoux