Improve Long and Short filter header

This commit is contained in:
2026-07-29 08:44:31 +02:00
parent 7dcb68ab69
commit e5b986efc5
2 changed files with 50 additions and 41 deletions

View File

@@ -342,12 +342,12 @@ class CTRMOpenPositionContext(ModelView):
('around_3m', 'Around 3M'),
('around_6m', 'Around 6M'),
('range', 'Range'),
], "Purchase Period")
purchase_period = fields.Many2One('product.month', "Purchase Period")
], "Purchase Filter")
purchase_period = fields.Many2One('product.month', "Exact Period")
purchase_period_from = fields.Many2One(
'product.month', "Purchase Period From")
'product.month', "From")
purchase_period_to = fields.Many2One(
'product.month', "Purchase Period To")
'product.month', "To")
sale_period_mode = fields.Selection([
(None, ''),
('all', 'All'),
@@ -356,12 +356,12 @@ class CTRMOpenPositionContext(ModelView):
('around_3m', 'Around 3M'),
('around_6m', 'Around 6M'),
('range', 'Range'),
], "Sale Period")
sale_period = fields.Many2One('product.month', "Sale Period")
], "Sale Filter")
sale_period = fields.Many2One('product.month', "Exact Period")
sale_period_from = fields.Many2One(
'product.month', "Sale Period From")
'product.month', "From")
sale_period_to = fields.Many2One(
'product.month', "Sale Period To")
'product.month', "To")
strategy = fields.Many2One('mtm.strategy', "Strategy")
counterparty = fields.Many2One('party.party', "Counterparty")
direction = fields.Selection([

View File

@@ -1,34 +1,43 @@
<form>
<label name="valuation_date"/>
<field name="valuation_date"/>
<label name="commodity"/>
<field name="commodity"/>
<label name="product"/>
<field name="product"/>
<label name="pricing_status"/>
<field name="pricing_status"/>
<label name="shipment_period"/>
<field name="shipment_period"/>
<label name="purchase_period_mode"/>
<field name="purchase_period_mode"/>
<label name="purchase_period"/>
<field name="purchase_period"/>
<label name="purchase_period_from"/>
<field name="purchase_period_from"/>
<label name="purchase_period_to"/>
<field name="purchase_period_to"/>
<label name="sale_period_mode"/>
<field name="sale_period_mode"/>
<label name="sale_period"/>
<field name="sale_period"/>
<label name="sale_period_from"/>
<field name="sale_period_from"/>
<label name="sale_period_to"/>
<field name="sale_period_to"/>
<label name="strategy"/>
<field name="strategy"/>
<label name="counterparty"/>
<field name="counterparty"/>
<label name="direction"/>
<field name="direction"/>
<form col="12">
<group id="common_filters" string="Common filters"
colspan="12" col="8" panel="summary">
<label name="valuation_date"/>
<field name="valuation_date"/>
<label name="commodity"/>
<field name="commodity"/>
<label name="product"/>
<field name="product"/>
<label name="pricing_status"/>
<field name="pricing_status"/>
<label name="shipment_period"/>
<field name="shipment_period"/>
<label name="strategy"/>
<field name="strategy"/>
<label name="counterparty"/>
<field name="counterparty"/>
<label name="direction"/>
<field name="direction"/>
</group>
<group id="purchase_filters" string="Purchase side"
colspan="6" col="4" panel="card">
<label name="purchase_period_mode"/>
<field name="purchase_period_mode"/>
<label name="purchase_period"/>
<field name="purchase_period"/>
<label name="purchase_period_from"/>
<field name="purchase_period_from"/>
<label name="purchase_period_to"/>
<field name="purchase_period_to"/>
</group>
<group id="sale_filters" string="Sale side"
colspan="6" col="4" panel="card">
<label name="sale_period_mode"/>
<field name="sale_period_mode"/>
<label name="sale_period"/>
<field name="sale_period"/>
<label name="sale_period_from"/>
<field name="sale_period_from"/>
<label name="sale_period_to"/>
<field name="sale_period_to"/>
</group>
</form>