diff --git a/modules/lot/lot.py b/modules/lot/lot.py index e192ccc..606bce4 100755 --- a/modules/lot/lot.py +++ b/modules/lot/lot.py @@ -500,7 +500,7 @@ class Lot(ModelSQL, ModelView): physic_sum = Decimal(0) for l in line.lots: if l.lot_type == 'physic' : - physic_sum += round(Decimal(Uom.compute_qty(Uom(l.lot_unit_line),float(l.get_current_quantity()),l.line.unit)),5) + physic_sum += round(Decimal(Uom.compute_qty(Uom(l.lot_unit_line),float(l.get_current_quantity()),l.line.unit, True, 1, 1)),5) return line.quantity_theorical - physic_sum def get_current_quantity(self,name=None): @@ -515,14 +515,14 @@ class Lot(ModelSQL, ModelView): if not unit: unit = self.line.unit if self.line else self.sale_line.unit qt, gross_qt = self.get_hist_quantity(state_id) - return round(Decimal(Uom.compute_qty(self.lot_unit_line, float(qt), unit)),5) + return round(Decimal(Uom.compute_qty(self.lot_unit_line, float(qt), unit, True, 1, 1)),5) def get_current_gross_quantity_converted(self,state_id=0,unit=None): Uom = Pool().get('product.uom') if not unit: unit = self.line.unit if self.line else self.sale_line.unit qt, gross_qt = self.get_hist_quantity(state_id) - return round(Decimal(Uom.compute_qty(self.lot_unit_line, float(gross_qt), unit)),5) + return round(Decimal(Uom.compute_qty(self.lot_unit_line, float(gross_qt), unit, True, 1, 1)),5) def get_current_gross_quantity(self,name=None): if self.lot_type == 'physic':