From f96e73d7b9810c08db81f6f743d21c925e9cae34 Mon Sep 17 00:00:00 2001 From: laurentbarontini Date: Mon, 26 Jan 2026 22:15:30 +0100 Subject: [PATCH] 26.01.26 --- modules/automation/automation.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/automation/automation.py b/modules/automation/automation.py index c2ac7b5..443225d 100644 --- a/modules/automation/automation.py +++ b/modules/automation/automation.py @@ -283,17 +283,17 @@ class AutomationDocument(ModelSQL, ModelView, Workflow): sale_line.enable_linked_currency = True sale_line.linked_currency = 1 sale_line.linked_unit = Uom.get_by_name(sell_price_unit) - sale_line.linked_price = sell_price + sale_line.linked_price = round(sell_price,4) sale_line.unit_price = sale_line.get_price_linked_currency() else: sale.currency = Currency.get_by_name(sell_price_currency) - sale_line.unit_price = sell_price + sale_line.unit_price = round(sell_price,4) sale_line.unit = Uom.get_by_name(sell_price_unit) sale_line.premium = premium Sale.save([sale]) sale_line.sale = sale.id - sale_line.quantity = lot_net_weight - sale_line.quantity_theorical = lot_net_weight + sale_line.quantity = round(lot_net_weight,5) + sale_line.quantity_theorical = round(lot_net_weight,5) sale_line.product = Product.get_by_name('BRAZIL COTTON') logger.info("PRODUCT:%s",sale_line.product) sale_line.unit = Uom.get_by_name(lot_unit) @@ -335,8 +335,8 @@ class AutomationDocument(ModelSQL, ModelView, Workflow): l.lot_qt = lot_bales l.lot_unit = Uom.get_by_name('bale') l.lot_unit_line = lot_unit - l.lot_quantity = lot_net_weight - l.lot_gross_quantity = lot_gross_weight + l.lot_quantity = round(lot_net_weight,5) + l.lot_gross_quantity = round(lot_gross_weight,5) l.lot_premium = premium LotQt.add_physical_lots(lqt,[l])