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

View File

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