diff --git a/modules/automation/automation.py b/modules/automation/automation.py index 7c1eb73..3368847 100644 --- a/modules/automation/automation.py +++ b/modules/automation/automation.py @@ -250,7 +250,7 @@ class AutomationDocument(ModelSQL, ModelView, Workflow): lot_net_weight = Decimal(row[4]) logger.info("LOT_NET_WEIGHT:%s",lot_net_weight) lot_gross_weight = Decimal(row[3]) - lot_bales = int(row[2]) + lot_bales = Decimal(row[2]) lot_number = row[1] customer = str(row[7]).strip().upper() sell_price_currency = str(row[8]).strip().upper() @@ -354,7 +354,7 @@ class AutomationDocument(ModelSQL, ModelView, Workflow): l = LotAdd() l.lot_qt = lot_bales l.lot_unit = Uom.get_by_name('bale') - l.lot_unit_line = lot_unit + l.lot_unit_line = Uom.get_by_name(lot_unit) l.lot_quantity = round(lot_net_weight,2) l.lot_gross_quantity = round(lot_gross_weight,2) l.lot_premium = premium