From 0a04774fac7c18c4f6398ea7bda15db172810ab2 Mon Sep 17 00:00:00 2001 From: laurentbarontini Date: Sun, 8 Feb 2026 19:15:12 +0100 Subject: [PATCH] 08.02.26 --- modules/purchase_trade/pricing.py | 14 +++++++++++++- .../view/component_tree_sequence.xml | 2 ++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/modules/purchase_trade/pricing.py b/modules/purchase_trade/pricing.py index 6bc1231..4eb3aad 100755 --- a/modules/purchase_trade/pricing.py +++ b/modules/purchase_trade/pricing.py @@ -84,7 +84,7 @@ class MtmStrategy(ModelSQL, ModelView): ) components = fields.One2Many( - 'mtm.component', 'strategy', "Components" + 'pricing.component', 'strategy', "Components" ) @classmethod @@ -271,9 +271,21 @@ class Component(ModelSQL, ModelView): "Component" __name__ = 'pricing.component' + strategy = fields.Many2One( + 'mtm.strategy', "Strategy", + required=False, ondelete='CASCADE' + ) + + price_source_type = fields.Selection([ + ('curve', 'Curve'), + ('matrix', 'Matrix'), + # ('manual', 'Manual'), + ], "Price Source", required=True) + fix_type = fields.Many2One('price.fixtype',"Fixation type") ratio = fields.Numeric("%") price_index = fields.Many2One('price.price',"Curve") + price_matrix = fields.Many2One('price.matrix', "Price Matrix") currency = fields.Function(fields.Many2One('currency.currency',"Curr."),'get_cur') auto = fields.Boolean("Auto") fallback = fields.Boolean("Fallback") diff --git a/modules/purchase_trade/view/component_tree_sequence.xml b/modules/purchase_trade/view/component_tree_sequence.xml index 864c4cc..e489eb0 100755 --- a/modules/purchase_trade/view/component_tree_sequence.xml +++ b/modules/purchase_trade/view/component_tree_sequence.xml @@ -1,7 +1,9 @@ + +