You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When confirming a manufacturing order with products which have different units of mesurements, an error is raised.
ValueError: Expected singleton: uom.uom(1, 8)
from
stock_reserve/models/stock_reserve.py", line 193, in write
rounding = self.product_uom.rounding
Thank you for your reply.
We extended your module (without overriding the write method) to include stock reservations in our stock move workflow.
In our customization, we call write method on many stock.reservation at once, which triggers the error.
For best practices, the fix should be included in your stock.reservation write method where you set the "rounding" variable line 193 rounding = self.product_uom.rounding that is dependant on the record.
To my understanding, the write method should be callable on multiple records at once, what do you think ?
Module
stock_reserve
Describe the bug
When confirming a manufacturing order with products which have different units of mesurements, an error is raised.
ValueError: Expected singleton: uom.uom(1, 8)
from
stock_reserve/models/stock_reserve.py", line 193, in write
rounding = self.product_uom.rounding
To Reproduce
Affected versions: 14.0 (maybe others)
confirm manufacturing orders
Steps to reproduce the behavior:
Expected behavior
Manufacturing order is confirmed and reservations are created for required products
Additional context
The text was updated successfully, but these errors were encountered: