This commit is contained in:
2026-03-11 21:27:43 +01:00
parent b23dba865f
commit 2fba795b11
4 changed files with 34 additions and 14 deletions

View File

@@ -515,6 +515,12 @@ class Lot(ModelSQL, ModelView):
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)
def get_current_gross_quantity_converted(self,state_id=0,name=None):
Uom = Pool().get('product.uom')
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)
def get_current_gross_quantity(self,name=None):
if self.lot_type == 'physic':