02.02.26
This commit is contained in:
@@ -239,6 +239,7 @@ class Dashboard(ModelSQL, ModelView):
|
||||
Configuration = Pool().get('gr.configuration')
|
||||
config = Configuration.search(['id','>',0])[0]
|
||||
Shipment = Pool().get('stock.shipment.in')
|
||||
DocumentIncoming = Pool().get('document.incoming')
|
||||
Fee = Pool().get('fee.fee')
|
||||
WR = Pool().get('weight.report')
|
||||
if config.automation:
|
||||
@@ -246,12 +247,16 @@ class Dashboard(ModelSQL, ModelView):
|
||||
shipment_trend = [sh for sh in shipment if sh.create_date == Date.today()]
|
||||
controller = Shipment.search([('controller','!=',None)])
|
||||
controller_trend = [co for co in controller if co.create_date == Date.today()]
|
||||
instruction = Shipment.search([('send_instruction','=',True)])
|
||||
instruction = Shipment.search([('result','!=',None)])
|
||||
instruction_trend = [si for si in instruction if si.create_date == Date.today()]
|
||||
id_received = Shipment.search([('returned_id','!=',None)])
|
||||
id_received_trend = [i for i in id_received if i.create_date == Date.today()]
|
||||
wr = WR.search([('id','>',0)])
|
||||
wr_trend = [w for w in wr if w.create_date == Date.today()]
|
||||
so = Fee.search(['id','=',25])
|
||||
so_trend = [s for s in so if s.create_date == Date.today()]
|
||||
di = DocumentIncoming.search(['id','>',0])
|
||||
di_trend = [d for d in di if d.create_date == Date.today()]
|
||||
return (
|
||||
config.dashboard +
|
||||
"/dashboard/index.html?shipment="
|
||||
@@ -273,7 +278,15 @@ class Dashboard(ModelSQL, ModelView):
|
||||
+ "&so="
|
||||
+ str(len(so))
|
||||
+ "&so_trend="
|
||||
+ str(len(so_trend)))
|
||||
+ str(len(so_trend))
|
||||
+ "&di="
|
||||
+ str(len(di))
|
||||
+ "&di_trend="
|
||||
+ str(len(di_trend))
|
||||
+ "&id_received="
|
||||
+ str(len(id_received))
|
||||
+ "&id_received_trend="
|
||||
+ str(len(id_received_trend)))
|
||||
|
||||
f1,f2,f3,f4,f5,d1,d2,d3,d4,d5 = self.get_last_five_fx_rates()
|
||||
Valuation = Pool().get('valuation.valuation')
|
||||
|
||||
Reference in New Issue
Block a user