mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[12.0][FIX] stock_secondary_unit: move line create round
On move line creation, the precision of secondary qty rounding is wrong; the unit of measure factor is being used instead of rounding.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
{
|
||||
'name': 'Stock Secondary Unit',
|
||||
'summary': 'Get product quantities in a secondary unit',
|
||||
'version': '12.0.1.0.1',
|
||||
'version': '12.0.1.0.2',
|
||||
'development_status': 'Beta',
|
||||
'category': 'stock',
|
||||
'website': 'https://github.com/OCA/stock-logistics-warehouse',
|
||||
|
||||
@@ -43,7 +43,7 @@ class StockMoveLine(models.Model):
|
||||
'product_uom_qty', vals.get('qty_done', 0.0))
|
||||
qty = float_round(
|
||||
move_line_qty / (factor or 1.0),
|
||||
precision_rounding=move.secondary_uom_id.uom_id.factor
|
||||
precision_rounding=move.secondary_uom_id.uom_id.rounding
|
||||
)
|
||||
vals.update({
|
||||
'secondary_uom_qty': qty,
|
||||
|
||||
Reference in New Issue
Block a user