This commit is contained in:
2026-02-08 19:15:12 +01:00
parent 720ad804a4
commit 0a04774fac
2 changed files with 15 additions and 1 deletions

View File

@@ -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")

View File

@@ -1,7 +1,9 @@
<tree editable="1">
<field name="price_source_type"/>
<field name="fix_type"/>
<field name="ratio"/>
<field name="price_index"/>
<field name="price_matrix"/>
<field name="currency"/>
<field name="auto"/>
<field name="fallback"/>