Pnl graph

This commit is contained in:
2026-07-10 12:22:16 +02:00
parent 62eed772fc
commit 8d386e6754
2 changed files with 4 additions and 1 deletions

View File

@@ -5295,10 +5295,11 @@ class PurchaseTradeTestCase(ModuleTestCase):
graph_field = pages[pnl_index + 1].find("field[@name='pnl_graph']")
self.assertIsNotNone(graph_field)
self.assertEqual(graph_field.get('widget'), 'rich_graph')
self.assertEqual(graph_field.get('records_field'), 'pnl_graph')
self.assertEqual(graph_field.get('date_field'), 'valuation_date')
self.assertEqual(graph_field.get('series'), 'pnl,mtm')
self.assertEqual(graph_field.get('labels'), 'pnl:Pnl,mtm:Mtm')
self.assertIsNone(graph_field.get('hidden_series'))
self.assertEqual(graph_field.get('hidden_series'), 'pnl_graph')
def test_shipment_in_pnl_lines_use_physical_and_open_lots(self):
'shipment PnL uses valuation lines from physical and open lot links'

View File

@@ -159,10 +159,12 @@ this repository contains the full copyright notices and license terms. -->
<page string="Pnl graph" col="4" id="pnl_graph">
<field name="pnl_graph"
widget="rich_graph"
records_field="pnl_graph"
date_field="valuation_date"
series="pnl,mtm"
labels="pnl:Pnl,mtm:Mtm"
colors="pnl:#00b894,mtm:#8b5cf6"
hidden_series="pnl_graph"
height="360"
colspan="4"/>
</page>