[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:
Enrique
2019-11-13 10:59:39 +01:00
committed by Rocío Vega
parent dc4ba49c16
commit bd27e79bb5
2 changed files with 2 additions and 2 deletions

View File

@@ -3,7 +3,7 @@
{ {
'name': 'Stock Secondary Unit', 'name': 'Stock Secondary Unit',
'summary': 'Get product quantities in a 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', 'development_status': 'Beta',
'category': 'stock', 'category': 'stock',
'website': 'https://github.com/OCA/stock-logistics-warehouse', 'website': 'https://github.com/OCA/stock-logistics-warehouse',

View File

@@ -43,7 +43,7 @@ class StockMoveLine(models.Model):
'product_uom_qty', vals.get('qty_done', 0.0)) 'product_uom_qty', vals.get('qty_done', 0.0))
qty = float_round( qty = float_round(
move_line_qty / (factor or 1.0), 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({ vals.update({
'secondary_uom_qty': qty, 'secondary_uom_qty': qty,