Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] stock: fix traceback when user creates a new replenishment record
Currently, a traceback occurs when the user tries to create a new stock replenishment record. To reproduce this issue: 1) Install `stock` 2) Create a new record from `operation/replenishment` Error:- "AssertionError: precision_rounding must be positive, got 0.0" This error is occurring because of the recent refactoring from the below commit. odoo@17d9af1 Initially, there was a condition that if there is no product or location, the `_get_qty_to_order` method simply returns False. But because the condition was removed from the above mentioned commit, we get the rounding value as 0.0 as there is no uom when initially creating a new record. This leads to the above traceback when the below line executes with rounding as 0.0 https://github.com/odoo/odoo/blob/74d4503a45c9d4ca741d349c3fce673358d2cc42/addons/stock/models/stock_orderpoint.py#L361-L364 sentry-6088943207 closes odoo#188733 X-original-commit: dbd0d6b Signed-off-by: Adrien Widart (awt) <[email protected]> Signed-off-by: Altaf Shaik (alsh) <[email protected]>
- Loading branch information