From 5bb1618b3080dfa816d8236e138370c988a69928 Mon Sep 17 00:00:00 2001 From: laurentbarontini Date: Mon, 16 Mar 2026 22:35:09 +0100 Subject: [PATCH] 16.03.26 --- modules/purchase_trade/fee.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/purchase_trade/fee.py b/modules/purchase_trade/fee.py index 2c59fd5..0af73ce 100755 --- a/modules/purchase_trade/fee.py +++ b/modules/purchase_trade/fee.py @@ -535,6 +535,12 @@ class Fee(ModelSQL,ModelView): p.line_type = 'service' p.from_location = fee.shipment_in.from_location if fee.shipment_in else (fee.line.purchase.from_location if fee.line else fee.sale_line.sale.from_location) p.to_location = fee.shipment_in.to_location if fee.shipment_in else (fee.line.purchase.to_location if fee.line else fee.sale_line.sale.to_location) + if fee.shipment_in and fee.shipment_in.lotqt: + p.payment_term = fee.shipment_in.lotqt[0].lot_p.line.purchase.payment_term + elif fee.line: + p.payment_term = fee.line.purchase.payment_term + elif fee.sale_line: + p.payment_term = fee.sale_line.sale.payment_term Purchase.save([p]) #if reception of moves done we need to generate accrual for fee if not fee.sale_line: