Use standard Long and Short header for detail report
This commit is contained in:
@@ -73,7 +73,6 @@ def register():
|
||||
ctrm_reporting.CTRMLongShortPeriodProduct,
|
||||
ctrm_reporting.CTRMLongShortPricingStatus,
|
||||
ctrm_reporting.CTRMLongShortDetail,
|
||||
ctrm_reporting.CTRMLongShortDetailContext,
|
||||
ctrm_reporting.CTRMRealizedPnl,
|
||||
ctrm_reporting.CTRMRealizedPnlContext,
|
||||
ctrm_reporting.CTRMMtmPnl,
|
||||
|
||||
@@ -831,76 +831,6 @@ class CTRMLongShortPricingStatus(
|
||||
line_pricing=True)
|
||||
|
||||
|
||||
class CTRMLongShortDetailContext(CTRMOpenPositionContext):
|
||||
"CTRM Long & Short Detail Context"
|
||||
__name__ = 'ctrm.reporting.position.long_short.detail.context'
|
||||
|
||||
asof = fields.Date("From Date")
|
||||
todate = fields.Date("To Date")
|
||||
purchase = fields.Many2One('purchase.purchase', "Purchase")
|
||||
sale = fields.Many2One('sale.sale', "Sale")
|
||||
supplier = fields.Many2One('party.party', "Supplier")
|
||||
client = fields.Many2One('party.party', "Client")
|
||||
reference = fields.Char("Reference")
|
||||
shipment = fields.Many2One('stock.shipment.in', "Shipment")
|
||||
vessel = fields.Many2One('trade.vessel', "Vessel")
|
||||
location = fields.Many2One('stock.location', "Location")
|
||||
dimension = fields.Many2One('analytic.dimension.value', "Dimension")
|
||||
matching_status = fields.Selection([
|
||||
('all', 'All'),
|
||||
('matched', 'Matched'),
|
||||
('not matched', 'Not Matched'),
|
||||
], "Matching")
|
||||
shipping_status = fields.Selection([
|
||||
('all', 'All'),
|
||||
('unshipped', 'Unshipped'),
|
||||
('planned', 'Planned'),
|
||||
('scheduled', 'Scheduled'),
|
||||
('shipped', 'Shipped'),
|
||||
('received', 'Received'),
|
||||
], "Shipping Status")
|
||||
lot_status = fields.Selection([
|
||||
('all', 'All'),
|
||||
('forecast', 'Forecast'),
|
||||
('loading', 'Loading'),
|
||||
('destination', 'Destination'),
|
||||
('stock', 'Stock'),
|
||||
('delivered', 'Delivered'),
|
||||
], "Where")
|
||||
lot_origin = fields.Selection([
|
||||
('all', 'All'),
|
||||
('open', 'Open'),
|
||||
('physic', 'Physic'),
|
||||
], "Open/Physic")
|
||||
availability = fields.Selection([
|
||||
('all', 'All'),
|
||||
('available', 'Available'),
|
||||
('reserved', 'Reserved'),
|
||||
('locked', 'Locked'),
|
||||
], "Availability")
|
||||
display_finished = fields.Boolean("Finished")
|
||||
|
||||
@classmethod
|
||||
def default_matching_status(cls):
|
||||
return 'all'
|
||||
|
||||
@classmethod
|
||||
def default_shipping_status(cls):
|
||||
return 'all'
|
||||
|
||||
@classmethod
|
||||
def default_lot_status(cls):
|
||||
return 'all'
|
||||
|
||||
@classmethod
|
||||
def default_lot_origin(cls):
|
||||
return 'all'
|
||||
|
||||
@classmethod
|
||||
def default_availability(cls):
|
||||
return 'all'
|
||||
|
||||
|
||||
class CTRMLongShortDetail(ModelSQL, ModelView):
|
||||
"CTRM Long & Short Detail"
|
||||
__name__ = 'ctrm.reporting.position.long_short.detail'
|
||||
|
||||
@@ -55,11 +55,6 @@
|
||||
<field name="type">tree</field>
|
||||
<field name="name">ctrm_open_position_list</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="ctrm_long_short_detail_context_view_form">
|
||||
<field name="model">ctrm.reporting.position.long_short.detail.context</field>
|
||||
<field name="type">form</field>
|
||||
<field name="name">ctrm_long_short_detail_context_form</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="ctrm_long_short_detail_view_list">
|
||||
<field name="model">ctrm.reporting.position.long_short.detail</field>
|
||||
<field name="type">tree</field>
|
||||
@@ -99,7 +94,7 @@
|
||||
<record model="ir.action.act_window" id="act_ctrm_long_short_detail">
|
||||
<field name="name">Long & Short Detail</field>
|
||||
<field name="res_model">ctrm.reporting.position.long_short.detail</field>
|
||||
<field name="context_model">ctrm.reporting.position.long_short.detail.context</field>
|
||||
<field name="context_model">ctrm.reporting.risk.open_position.context</field>
|
||||
</record>
|
||||
<record model="ir.action.act_window.view" id="act_ctrm_long_short_detail_view">
|
||||
<field name="sequence" eval="10"/>
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
<form col="12">
|
||||
<group id="common_filters" string="Common filters"
|
||||
colspan="12" col="8">
|
||||
<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">
|
||||
<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">
|
||||
<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>
|
||||
Reference in New Issue
Block a user