Merge dev from main #1

Merged
admin merged 25 commits from main into dev 2026-01-05 13:03:46 +00:00
3 changed files with 7 additions and 1 deletions
Showing only changes of commit a34f02db00 - Show all commits

View File

@@ -228,6 +228,8 @@ class Dashboard(ModelSQL, ModelView):
return round(1/last_rate,6), round(1/prev_rate,6) return round(1/last_rate,6), round(1/prev_rate,6)
def get_tremor(self,name): def get_tremor(self,name):
Configuration = Pool().get('gr.configuration')
config = Configuration.search(['id','>',0])[0]
Pnl = Pool().get('valuation.valuation') Pnl = Pool().get('valuation.valuation')
pnls = Pnl.search(['id','>',0]) pnls = Pnl.search(['id','>',0])
pnl_amount = "{:,.0f}".format(round(sum([e.amount for e in pnls]),0)) pnl_amount = "{:,.0f}".format(round(sum([e.amount for e in pnls]),0))
@@ -282,7 +284,8 @@ class Dashboard(ModelSQL, ModelView):
move_cash = len(accs) move_cash = len(accs)
return ( return (
"https://srv413259.hstgr.cloud/dashboard/index.html?pnl_amount=" config.dashboard +
"/dashboard/index.html?pnl_amount="
+ str(pnl_amount) + str(pnl_amount)
+ "&exposure=" + "&exposure="
+ str(exposure) + str(exposure)

View File

@@ -12,4 +12,5 @@ class GRConfiguration(ModelSingleton, ModelSQL, ModelView):
__name__ = 'gr.configuration' __name__ = 'gr.configuration'
bi = fields.Char("BI connexion") bi = fields.Char("BI connexion")
dashboard = fields.Char("Dashboard connexion")
dark = fields.Boolean("Dark mode") dark = fields.Boolean("Dark mode")

View File

@@ -1,6 +1,8 @@
<form> <form>
<label name="bi"/> <label name="bi"/>
<field name="bi"/> <field name="bi"/>
<label name="dashboard"/>
<field name="dashboard"/>
<label name="dark"/> <label name="dark"/>
<field name="dark"/> <field name="dark"/>
</form> </form>