From 34166dedc66f8bcb5cb92572b585af308e3716ec Mon Sep 17 00:00:00 2001 From: laurentbarontini Date: Sat, 7 Feb 2026 19:31:54 +0100 Subject: [PATCH] 07.02.26 --- modules/purchase_trade/pricing.py | 4 ++++ modules/purchase_trade/purchase.py | 2 +- modules/purchase_trade/view/mtm_strategy_form.xml | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/purchase_trade/pricing.py b/modules/purchase_trade/pricing.py index 33e3c76..6bc1231 100755 --- a/modules/purchase_trade/pricing.py +++ b/modules/purchase_trade/pricing.py @@ -87,6 +87,10 @@ class MtmStrategy(ModelSQL, ModelView): 'mtm.component', 'strategy', "Components" ) + @classmethod + def default_active(cls): + return True + def compute_mtm(self): pool = Pool() Currency = pool.get('currency.currency') diff --git a/modules/purchase_trade/purchase.py b/modules/purchase_trade/purchase.py index 1901858..fe05f6c 100755 --- a/modules/purchase_trade/purchase.py +++ b/modules/purchase_trade/purchase.py @@ -380,7 +380,7 @@ class Purchase(metaclass=PoolMeta): if line.quantity_theorical: OpenPosition = Pool().get('open.position') - OpenPosition.create_from_purchase_line(line) + # OpenPosition.create_from_purchase_line(line) #line unit_price calculation if line.price_type == 'basis' and line.lots: #line.price_pricing and line.price_components and diff --git a/modules/purchase_trade/view/mtm_strategy_form.xml b/modules/purchase_trade/view/mtm_strategy_form.xml index 061d23a..712f4e9 100644 --- a/modules/purchase_trade/view/mtm_strategy_form.xml +++ b/modules/purchase_trade/view/mtm_strategy_form.xml @@ -5,6 +5,8 @@