|
@ -21,7 +21,7 @@ def get_data(filters): |
|
|
from {0}.`tabApp Log` al, {0}.`tabApp Device` ad, {0}.`tabApp Users` au, {0}.`tabApp Dealer` dealer |
|
|
from {0}.`tabApp Log` al, {0}.`tabApp Device` ad, {0}.`tabApp Users` au, {0}.`tabApp Dealer` dealer |
|
|
where |
|
|
where |
|
|
al.device = ad.name and al.user = au.name and au.dealer = dealer.name and (al.type = 'Installed' or al.type = 'Reinstalled') and |
|
|
al.device = ad.name and al.user = au.name and au.dealer = dealer.name and (al.type = 'Installed' or al.type = 'Reinstalled') and |
|
|
(date(al.modified) between '{1}' and '{2}')""".format(current_db_name,filters.get('from_date'), filters.get('to_date')), as_dict=1) |
|
|
(date(al.modified) between '{1}' and '{2}') ORDER BY ad.last_login DESC""".format(current_db_name,filters.get('from_date'), filters.get('to_date')), as_dict=1) |
|
|
|
|
|
|
|
|
if data: |
|
|
if data: |
|
|
return data |
|
|
return data |
|
@ -44,23 +44,3 @@ def get_columns(): |
|
|
{"label": _("<b>App Last Accessed Date</b>"), "fieldname": "date", "fieldtype": "DateTime","width": 200} |
|
|
{"label": _("<b>App Last Accessed Date</b>"), "fieldname": "date", "fieldtype": "DateTime","width": 200} |
|
|
] |
|
|
] |
|
|
return columns |
|
|
return columns |
|
|
|
|
|
|
|
|
# def get_columns(): |
|
|
|
|
|
# columns = [ |
|
|
|
|
|
# {"label": _("<b>Zone</b>"), "fieldname": "zone", "fieldtype": "Data", "width": 100}, |
|
|
|
|
|
# {"label": _("<b>Area Office</b>"), "fieldname": "area", "fieldtype":"Data","width": 150}, |
|
|
|
|
|
# {"label": _("<b>Dealer Code</b>"), "fieldname": "dealer_code", "fieldtype": "Data", "width": 100}, |
|
|
|
|
|
# {"label": _("<b>Dealer Name</b>"), "fieldname": "dealer_name", "fieldtype":"Data","width": 150}, |
|
|
|
|
|
# {"label": _("<b>Installation</b>"), "fieldname": "device", "fieldtype": "Data","width": 100}, |
|
|
|
|
|
# {"label": _("<b>Device</b>"), "fieldname": "device_type", "fieldtype": "Data","width": 100}, |
|
|
|
|
|
# {"label": _("<b>Device ID</b>"), "fieldname": "device_id", "fieldtype": "Data", "width": 100}, |
|
|
|
|
|
# {"label": _("<b>Device OS</b>"), "fieldname": "os", "fieldtype": "Data", "width": 100}, |
|
|
|
|
|
# {"label": _("<b>OS Version</b>"), "fieldname": "os_version", "fieldtype": "Data", "width": 100}, |
|
|
|
|
|
# {"label": _("<b>User ID</b>"), "fieldname": "user_id", "fieldtype": "Data", "width": 100}, |
|
|
|
|
|
# {"label": _("<b>User Name</b>"), "fieldname": "user_name", "fieldtype": "Data", "width": 100}, |
|
|
|
|
|
# {"label": _("<b>Activity Type</b>"), "fieldname": "type", "fieldtype": "Data","width": 100}, |
|
|
|
|
|
# {"label": _("<b>App Installation Date</b>"), "fieldname": "date_time_stamp", "fieldtype": "DateTime","width": 200}, |
|
|
|
|
|
# {"label": _("<b>App Last Accessed Date</b>"), "fieldname": "date", "fieldtype": "DateTime","width": 200}, |
|
|
|
|
|
# {"label": _("<b>App Version No</b>"), "fieldname": "app_current_version", "fieldtype": "Data", "width": 150}, |
|
|
|
|
|
# ] |
|
|
|
|
|
# return columns |
|
|
|
|
|