08.02.26
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
Reference in New Issue
Block a user