From 49d2438ea0a9b1aa2e76764cd77398ca2a7a994f Mon Sep 17 00:00:00 2001 From: laurentbarontini Date: Mon, 5 Jan 2026 20:33:56 +0100 Subject: [PATCH] 05.01.26 --- modules/purchase_trade/stock.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/modules/purchase_trade/stock.py b/modules/purchase_trade/stock.py index 0a12198..5e76ced 100755 --- a/modules/purchase_trade/stock.py +++ b/modules/purchase_trade/stock.py @@ -573,14 +573,8 @@ class ShipmentIn(metaclass=PoolMeta): Lot.save([lot]) #update line valuation Pnl = Pool().get('valuation.valuation') - # for lot in lots: - # pnl = Pnl.search([('line','=',lot.line.id)]) - # if pnl: - # Pnl.delete(pnl) - # pnl_lines = [] - # pnl_lines.extend(lot.line.get_pnl_fee_lines()) - # pnl_lines.extend(lot.line.get_pnl_price_lines()) - # Pnl.save(pnl_lines) + for lot in lots: + Pnl.generate(lot.line) if sh.sof: for sof in sh.sof: if sof.chart: