Merge remote-tracking branch 'upstream/develop' into filter-email-recipients
This commit is contained in:
commit
e854b7ba5d
400 changed files with 42211 additions and 3401 deletions
4
.github/workflows/patch-mariadb-tests.yml
vendored
4
.github/workflows/patch-mariadb-tests.yml
vendored
|
|
@ -43,12 +43,12 @@ jobs:
|
|||
|
||||
services:
|
||||
mariadb:
|
||||
image: mariadb:10.6
|
||||
image: mariadb:11.3
|
||||
env:
|
||||
MARIADB_ROOT_PASSWORD: travis
|
||||
ports:
|
||||
- 3306:3306
|
||||
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
|
||||
options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=5s --health-timeout=2s --health-retries=3
|
||||
|
||||
steps:
|
||||
- name: Clone
|
||||
|
|
|
|||
4
.github/workflows/server-tests.yml
vendored
4
.github/workflows/server-tests.yml
vendored
|
|
@ -54,12 +54,12 @@ jobs:
|
|||
|
||||
services:
|
||||
mariadb:
|
||||
image: mariadb:10.6
|
||||
image: mariadb:11.3
|
||||
env:
|
||||
MARIADB_ROOT_PASSWORD: travis
|
||||
ports:
|
||||
- 3306:3306
|
||||
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
|
||||
options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=5s --health-timeout=2s --health-retries=3
|
||||
|
||||
postgres:
|
||||
image: postgres:12.4
|
||||
|
|
|
|||
4
.github/workflows/ui-tests.yml
vendored
4
.github/workflows/ui-tests.yml
vendored
|
|
@ -55,12 +55,12 @@ jobs:
|
|||
|
||||
services:
|
||||
mariadb:
|
||||
image: mariadb:10.6
|
||||
image: mariadb:11.3
|
||||
env:
|
||||
MARIADB_ROOT_PASSWORD: travis
|
||||
ports:
|
||||
- 3306:3306
|
||||
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
|
||||
options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=5s --health-timeout=2s --health-retries=3
|
||||
|
||||
steps:
|
||||
- name: Clone
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ export default {
|
|||
naming_rule: "By fieldname",
|
||||
owner: "Administrator",
|
||||
permissions: [],
|
||||
sort_field: "modified",
|
||||
sort_field: "creation",
|
||||
sort_order: "ASC",
|
||||
track_changes: 1,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ export default {
|
|||
naming_rule: "By fieldname",
|
||||
owner: "Administrator",
|
||||
permissions: [],
|
||||
sort_field: "modified",
|
||||
sort_field: "creation",
|
||||
sort_order: "ASC",
|
||||
track_changes: 1,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ export default {
|
|||
},
|
||||
],
|
||||
quick_entry: 1,
|
||||
sort_field: "modified",
|
||||
sort_field: "creation",
|
||||
sort_order: "ASC",
|
||||
track_changes: 1,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ export default {
|
|||
},
|
||||
],
|
||||
quick_entry: 1,
|
||||
sort_field: "modified",
|
||||
sort_field: "creation",
|
||||
sort_order: "ASC",
|
||||
track_changes: 1,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ export default {
|
|||
},
|
||||
],
|
||||
quick_entry: 1,
|
||||
sort_field: "modified",
|
||||
sort_field: "creation",
|
||||
sort_order: "ASC",
|
||||
track_changes: 1,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ export default {
|
|||
write: 1,
|
||||
},
|
||||
],
|
||||
sort_field: "modified",
|
||||
sort_field: "creation",
|
||||
sort_order: "ASC",
|
||||
track_changes: 1,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ export default {
|
|||
write: 1,
|
||||
},
|
||||
],
|
||||
sort_field: "modified",
|
||||
sort_field: "creation",
|
||||
sort_order: "ASC",
|
||||
track_changes: 1,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ export default {
|
|||
cancel: 1,
|
||||
},
|
||||
],
|
||||
sort_field: "modified",
|
||||
sort_field: "creation",
|
||||
sort_order: "ASC",
|
||||
track_changes: 1,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ export default {
|
|||
],
|
||||
quick_entry: 1,
|
||||
autoname: "format: Test-{####}",
|
||||
sort_field: "modified",
|
||||
sort_field: "creation",
|
||||
sort_order: "ASC",
|
||||
track_changes: 1,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ export default {
|
|||
write: 1,
|
||||
},
|
||||
],
|
||||
sort_field: "modified",
|
||||
sort_field: "creation",
|
||||
sort_order: "ASC",
|
||||
track_changes: 1,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -343,6 +343,7 @@ def connect(site: str | None = None, db_name: str | None = None, set_admin_as_us
|
|||
assert local.conf.db_password, "site must be fully initialized, db_password missing"
|
||||
|
||||
local.db = get_db(
|
||||
socket=local.conf.db_socket,
|
||||
host=local.conf.db_host,
|
||||
port=local.conf.db_port,
|
||||
user=local.conf.db_user or db_name,
|
||||
|
|
@ -368,6 +369,7 @@ def connect_replica() -> bool:
|
|||
password = local.conf.replica_db_password
|
||||
|
||||
local.replica_db = get_db(
|
||||
socket=None,
|
||||
host=local.conf.replica_host,
|
||||
port=port,
|
||||
user=user,
|
||||
|
|
@ -430,6 +432,7 @@ def get_site_config(sites_path: str | None = None, site_path: str | None = None)
|
|||
os.environ.get("FRAPPE_REDIS_CACHE") or config.get("redis_cache") or "redis://127.0.0.1:13311"
|
||||
)
|
||||
config["db_type"] = os.environ.get("FRAPPE_DB_TYPE") or config.get("db_type") or "mariadb"
|
||||
config["db_socket"] = os.environ.get("FRAPPE_DB_SOCKET") or config.get("db_socket")
|
||||
config["db_host"] = os.environ.get("FRAPPE_DB_HOST") or config.get("db_host") or "127.0.0.1"
|
||||
config["db_port"] = (
|
||||
os.environ.get("FRAPPE_DB_PORT") or config.get("db_port") or db_default_ports(config["db_type"])
|
||||
|
|
@ -1187,8 +1190,10 @@ def generate_hash(txt: str | None = None, length: int = 56) -> str:
|
|||
import math
|
||||
import secrets
|
||||
|
||||
if not length:
|
||||
length = 56
|
||||
if txt:
|
||||
from frappe.utils.deprecations import deprecation_warning
|
||||
|
||||
deprecation_warning("The `txt` parameter is deprecated and will be removed in a future release.")
|
||||
|
||||
return secrets.token_hex(math.ceil(length / 2))[:length]
|
||||
|
||||
|
|
@ -2045,7 +2050,7 @@ def get_list(doctype, *args, **kwargs):
|
|||
:param doctype: DocType on which query is to be made.
|
||||
:param fields: List of fields or `*`.
|
||||
:param filters: List of filters (see example).
|
||||
:param order_by: Order By e.g. `modified desc`.
|
||||
:param order_by: Order By e.g. `creation desc`.
|
||||
:param limit_start: Start results at record #. Default 0.
|
||||
:param limit_page_length: No of records in the page. Default 20.
|
||||
|
||||
|
|
@ -2069,7 +2074,7 @@ def get_all(doctype, *args, **kwargs):
|
|||
:param doctype: DocType on which query is to be made.
|
||||
:param fields: List of fields or `*`. Default is: `["name"]`.
|
||||
:param filters: List of filters (see example).
|
||||
:param order_by: Order By e.g. `modified desc`.
|
||||
:param order_by: Order By e.g. `creation desc`.
|
||||
:param limit_start: Start results at record #. Default 0.
|
||||
:param limit_page_length: No of records in the page. Default 20.
|
||||
|
||||
|
|
|
|||
|
|
@ -154,10 +154,11 @@
|
|||
],
|
||||
"index_web_pages_for_search": 1,
|
||||
"links": [],
|
||||
"modified": "2021-07-16 22:51:35.505575",
|
||||
"modified": "2024-03-23 16:01:27.590910",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Automation",
|
||||
"name": "Assignment Rule",
|
||||
"naming_rule": "Set by user",
|
||||
"owner": "Administrator",
|
||||
"permissions": [
|
||||
{
|
||||
|
|
@ -173,7 +174,8 @@
|
|||
"write": 1
|
||||
}
|
||||
],
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1
|
||||
}
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"actions": [],
|
||||
"creation": "2019-09-21 16:52:01.705351",
|
||||
"doctype": "DocType",
|
||||
"editable_grid": 1,
|
||||
|
|
@ -16,13 +17,15 @@
|
|||
}
|
||||
],
|
||||
"istable": 1,
|
||||
"modified": "2019-09-21 16:55:09.376291",
|
||||
"links": [],
|
||||
"modified": "2024-03-23 16:01:27.759155",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Automation",
|
||||
"name": "Assignment Rule Day",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1
|
||||
}
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
"actions": [],
|
||||
"allow_read": 1,
|
||||
"creation": "2019-02-27 11:41:46.602400",
|
||||
"doctype": "DocType",
|
||||
"editable_grid": 1,
|
||||
|
|
@ -21,14 +20,15 @@
|
|||
"index_web_pages_for_search": 1,
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2020-09-29 20:12:14.456785",
|
||||
"modified": "2024-03-23 16:01:27.847608",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Automation",
|
||||
"name": "Assignment Rule User",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"quick_entry": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1
|
||||
}
|
||||
|
|
@ -211,7 +211,7 @@
|
|||
}
|
||||
],
|
||||
"links": [],
|
||||
"modified": "2021-01-12 09:24:49.719611",
|
||||
"modified": "2024-03-23 16:01:28.502039",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Automation",
|
||||
"name": "Auto Repeat",
|
||||
|
|
@ -255,8 +255,9 @@
|
|||
}
|
||||
],
|
||||
"search_fields": "reference_document",
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"title_field": "reference_document",
|
||||
"track_changes": 1
|
||||
}
|
||||
|
|
@ -20,14 +20,15 @@
|
|||
"index_web_pages_for_search": 1,
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2020-11-10 22:30:53.690228",
|
||||
"modified": "2024-03-23 16:01:28.738641",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Automation",
|
||||
"name": "Auto Repeat Day",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"quick_entry": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1
|
||||
}
|
||||
|
|
@ -53,7 +53,7 @@
|
|||
],
|
||||
"in_create": 1,
|
||||
"links": [],
|
||||
"modified": "2023-12-08 15:52:37.525003",
|
||||
"modified": "2024-03-23 16:03:29.694506",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Automation",
|
||||
"name": "Milestone",
|
||||
|
|
@ -73,7 +73,7 @@
|
|||
}
|
||||
],
|
||||
"quick_entry": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"title_field": "reference_type",
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
}
|
||||
],
|
||||
"links": [],
|
||||
"modified": "2023-12-08 15:52:37.525003",
|
||||
"modified": "2024-03-23 16:03:29.801483",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Automation",
|
||||
"name": "Milestone Tracker",
|
||||
|
|
@ -54,7 +54,7 @@
|
|||
"write": 1
|
||||
}
|
||||
],
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ class TestMilestoneTracker(FrappeTestCase):
|
|||
"Milestone",
|
||||
fields=["track_field", "value", "milestone_tracker"],
|
||||
filters=dict(reference_type=todo.doctype, reference_name=todo.name),
|
||||
order_by="modified desc",
|
||||
order_by="creation desc",
|
||||
)
|
||||
|
||||
self.assertEqual(len(milestones), 2)
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@
|
|||
],
|
||||
"index_web_pages_for_search": 1,
|
||||
"links": [],
|
||||
"modified": "2023-08-28 22:17:18.351025",
|
||||
"modified": "2024-03-23 16:03:36.224060",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Automation",
|
||||
"name": "Reminder",
|
||||
|
|
@ -83,7 +83,7 @@
|
|||
}
|
||||
],
|
||||
"quick_entry": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"title_field": "description"
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
import os
|
||||
import shutil
|
||||
import sys
|
||||
import traceback
|
||||
|
||||
# imports - third party imports
|
||||
import click
|
||||
|
|
@ -10,6 +11,7 @@ import click
|
|||
import frappe
|
||||
from frappe.commands import get_site, pass_context
|
||||
from frappe.exceptions import SiteNotSpecifiedError
|
||||
from frappe.utils import CallbackManager
|
||||
|
||||
|
||||
@click.command("new-site")
|
||||
|
|
@ -30,11 +32,25 @@ from frappe.exceptions import SiteNotSpecifiedError
|
|||
help='Root username for MariaDB or PostgreSQL, Default is "root"',
|
||||
)
|
||||
@click.option("--db-root-password", "--mariadb-root-password", help="Root password for MariaDB or PostgreSQL")
|
||||
@click.option(
|
||||
"--db-socket",
|
||||
"--mariadb-db-socket",
|
||||
envvar="MYSQL_UNIX_PORT",
|
||||
help="Database socket for MariaDB or folder containing database socket for PostgreSQL",
|
||||
)
|
||||
@click.option(
|
||||
"--no-mariadb-socket",
|
||||
is_flag=True,
|
||||
default=False,
|
||||
help="Set MariaDB host to % and use TCP/IP Socket instead of using the UNIX Socket",
|
||||
help="DEPRECATED: Set MariaDB host to % and use TCP/IP Socket instead of using the UNIX Socket",
|
||||
)
|
||||
@click.option(
|
||||
"--mariadb-user-host-login-scope",
|
||||
help=(
|
||||
"Set the mariadb host for the user login scope if you don't want to use the current host as login "
|
||||
"scope which typically is ''@'localhost' - may be used when initializing a user on a remote host. "
|
||||
"See the mariadb docs on account names for more info."
|
||||
),
|
||||
)
|
||||
@click.option("--admin-password", help="Administrator password for new site", default=None)
|
||||
@click.option("--verbose", is_flag=True, default=False, help="Verbose")
|
||||
|
|
@ -57,10 +73,12 @@ def new_site(
|
|||
source_sql=None,
|
||||
force=None,
|
||||
no_mariadb_socket=False,
|
||||
mariadb_user_host_login_scope=False,
|
||||
install_app=None,
|
||||
db_name=None,
|
||||
db_password=None,
|
||||
db_type=None,
|
||||
db_socket=None,
|
||||
db_host=None,
|
||||
db_port=None,
|
||||
db_user=None,
|
||||
|
|
@ -72,27 +90,53 @@ def new_site(
|
|||
|
||||
frappe.init(site=site, new_site=True)
|
||||
|
||||
_new_site(
|
||||
db_name,
|
||||
site,
|
||||
db_root_username=db_root_username,
|
||||
db_root_password=db_root_password,
|
||||
admin_password=admin_password,
|
||||
verbose=verbose,
|
||||
install_apps=install_app,
|
||||
source_sql=source_sql,
|
||||
force=force,
|
||||
no_mariadb_socket=no_mariadb_socket,
|
||||
db_password=db_password,
|
||||
db_type=db_type,
|
||||
db_host=db_host,
|
||||
db_port=db_port,
|
||||
db_user=db_user,
|
||||
setup_db=setup_db,
|
||||
)
|
||||
mariadb_user_host_login_scope = None
|
||||
|
||||
if set_default:
|
||||
use(site)
|
||||
if no_mariadb_socket:
|
||||
click.secho(
|
||||
"--no-mariadb-socket is DEPRECATED; "
|
||||
"use --mariadb-user-host-login-scope='%' (wildcard) or --mariadb-user-host-login-scope=<myhostscope>, instead. "
|
||||
"The name of this option was misleading: it had nothing to do with sockets.",
|
||||
fg="yellow",
|
||||
)
|
||||
mariadb_user_host_login_scope = "%"
|
||||
if mariadb_user_host_login_scope:
|
||||
mariadb_user_host_login_scope = mariadb_user_host_login_scope
|
||||
|
||||
rollback_callback = CallbackManager()
|
||||
|
||||
try:
|
||||
_new_site(
|
||||
db_name,
|
||||
site,
|
||||
db_root_username=db_root_username,
|
||||
db_root_password=db_root_password,
|
||||
admin_password=admin_password,
|
||||
verbose=verbose,
|
||||
install_apps=install_app,
|
||||
source_sql=source_sql,
|
||||
force=force,
|
||||
db_password=db_password,
|
||||
db_type=db_type,
|
||||
db_socket=db_socket,
|
||||
db_host=db_host,
|
||||
db_port=db_port,
|
||||
db_user=db_user,
|
||||
setup_db=setup_db,
|
||||
rollback_callback=rollback_callback,
|
||||
mariadb_user_host_login_scope=mariadb_user_host_login_scope,
|
||||
)
|
||||
|
||||
if set_default:
|
||||
use(site)
|
||||
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
if sys.__stdin__.isatty() and click.confirm(
|
||||
"Site creation failed, do you want to rollback the site?", abort=True
|
||||
):
|
||||
rollback_callback.run()
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
@click.command("restore")
|
||||
|
|
@ -421,7 +465,6 @@ def _reinstall(
|
|||
site,
|
||||
verbose=verbose,
|
||||
force=True,
|
||||
reinstall=True,
|
||||
install_apps=installed,
|
||||
db_root_username=db_root_username,
|
||||
db_root_password=db_root_password,
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ def new_language(context, lang_code, app):
|
|||
frappe.translate.write_translations_file(app, lang_code)
|
||||
|
||||
print(f"File created at ./apps/{app}/{app}/translations/{lang_code}.csv")
|
||||
print("You will need to add the language in frappe/geo/languages.json, if you haven't done it already.")
|
||||
print("You will need to add the language in frappe/geo/languages.csv, if you haven't done it already.")
|
||||
|
||||
|
||||
@click.command("get-untranslated")
|
||||
|
|
|
|||
|
|
@ -526,6 +526,7 @@ def _enter_console(extra_args=None):
|
|||
os.environ["PSQL_HISTORY"] = os.path.abspath(get_site_path("logs", "postgresql_console.log"))
|
||||
|
||||
bin, args, bin_name = get_command(
|
||||
socket=frappe.conf.db_socket,
|
||||
host=frappe.conf.db_host,
|
||||
port=frappe.conf.db_port,
|
||||
user=frappe.conf.db_user,
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@
|
|||
"icon": "fa fa-map-marker",
|
||||
"idx": 5,
|
||||
"links": [],
|
||||
"modified": "2023-11-20 17:28:41.698356",
|
||||
"modified": "2024-03-23 16:01:27.068028",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Contacts",
|
||||
"name": "Address",
|
||||
|
|
@ -220,7 +220,7 @@
|
|||
}
|
||||
],
|
||||
"search_fields": "country, state",
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": []
|
||||
}
|
||||
|
|
@ -20,7 +20,6 @@
|
|||
"label": "Country",
|
||||
"options": "Country",
|
||||
"reqd": 1,
|
||||
"search_index": 1,
|
||||
"unique": 1
|
||||
},
|
||||
{
|
||||
|
|
@ -40,7 +39,7 @@
|
|||
],
|
||||
"icon": "fa fa-map-marker",
|
||||
"links": [],
|
||||
"modified": "2022-08-03 12:20:49.095228",
|
||||
"modified": "2024-03-23 16:01:27.242795",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Contacts",
|
||||
"name": "Address Template",
|
||||
|
|
@ -58,7 +57,7 @@
|
|||
}
|
||||
],
|
||||
"quick_entry": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": []
|
||||
}
|
||||
}
|
||||
|
|
@ -257,7 +257,7 @@
|
|||
"image_field": "image",
|
||||
"index_web_pages_for_search": 1,
|
||||
"links": [],
|
||||
"modified": "2023-12-08 15:52:37.525003",
|
||||
"modified": "2024-03-23 16:01:30.937045",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Contacts",
|
||||
"name": "Contact",
|
||||
|
|
@ -391,7 +391,7 @@
|
|||
}
|
||||
],
|
||||
"show_title_field_in_link": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"title_field": "full_name"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"actions": [],
|
||||
"creation": "2019-08-02 13:08:59.291097",
|
||||
"doctype": "DocType",
|
||||
"editable_grid": 1,
|
||||
|
|
@ -26,14 +27,16 @@
|
|||
}
|
||||
],
|
||||
"istable": 1,
|
||||
"modified": "2019-09-24 17:47:30.565805",
|
||||
"links": [],
|
||||
"modified": "2024-03-23 16:01:31.173691",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Contacts",
|
||||
"name": "Contact Email",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"quick_entry": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1
|
||||
}
|
||||
|
|
@ -37,14 +37,15 @@
|
|||
],
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2020-04-06 18:28:10.486220",
|
||||
"modified": "2024-03-23 16:01:31.293047",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Contacts",
|
||||
"name": "Contact Phone",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"quick_entry": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1
|
||||
}
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
}
|
||||
],
|
||||
"links": [],
|
||||
"modified": "2022-08-05 18:33:28.043370",
|
||||
"modified": "2024-03-23 16:03:26.299387",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Contacts",
|
||||
"name": "Gender",
|
||||
|
|
@ -40,7 +40,7 @@
|
|||
"role": "All"
|
||||
}
|
||||
],
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1,
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@
|
|||
}
|
||||
],
|
||||
"links": [],
|
||||
"modified": "2022-08-05 18:33:28.196387",
|
||||
"modified": "2024-03-23 16:03:37.726490",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Contacts",
|
||||
"name": "Salutation",
|
||||
|
|
@ -53,7 +53,7 @@
|
|||
"write": 1
|
||||
}
|
||||
],
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1,
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ def get_files_by_search_text(text: str) -> list[dict]:
|
|||
"file_url": text,
|
||||
"name": ("like", text),
|
||||
},
|
||||
order_by="modified desc",
|
||||
order_by="creation desc",
|
||||
limit=20,
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@
|
|||
}
|
||||
],
|
||||
"links": [],
|
||||
"modified": "2022-06-13 05:59:26.866004",
|
||||
"modified": "2024-03-23 16:01:26.702078",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Access Log",
|
||||
|
|
@ -149,7 +149,7 @@
|
|||
"share": 1
|
||||
}
|
||||
],
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_seen": 1
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ class AccessLog(Document):
|
|||
from frappe.query_builder.functions import Now
|
||||
|
||||
table = frappe.qb.DocType("Access Log")
|
||||
frappe.db.delete(table, filters=(table.modified < (Now() - Interval(days=days))))
|
||||
frappe.db.delete(table, filters=(table.creation < (Now() - Interval(days=days))))
|
||||
|
||||
|
||||
@frappe.whitelist()
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@
|
|||
"icon": "fa fa-comment",
|
||||
"index_web_pages_for_search": 1,
|
||||
"links": [],
|
||||
"modified": "2024-02-24 16:31:16.253153",
|
||||
"modified": "2024-03-23 16:01:26.898094",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Activity Log",
|
||||
|
|
@ -173,7 +173,7 @@
|
|||
}
|
||||
],
|
||||
"search_fields": "subject",
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"title_field": "subject",
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class ActivityLog(Document):
|
|||
if not days:
|
||||
days = 90
|
||||
doctype = DocType("Activity Log")
|
||||
frappe.db.delete(doctype, filters=(doctype.modified < (Now() - Interval(days=days))))
|
||||
frappe.db.delete(doctype, filters=(doctype.creation < (Now() - Interval(days=days))))
|
||||
|
||||
|
||||
def on_doctype_update():
|
||||
|
|
|
|||
|
|
@ -32,13 +32,13 @@
|
|||
"index_web_pages_for_search": 1,
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2023-06-16 18:26:16.247475",
|
||||
"modified": "2024-03-23 16:01:27.410335",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Amended Document Naming Settings",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": []
|
||||
}
|
||||
|
|
@ -99,7 +99,7 @@
|
|||
"index_web_pages_for_search": 1,
|
||||
"issingle": 1,
|
||||
"links": [],
|
||||
"modified": "2023-10-31 13:12:41.749483",
|
||||
"modified": "2024-03-23 16:01:28.029916",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Audit Trail",
|
||||
|
|
@ -114,7 +114,7 @@
|
|||
"write": 1
|
||||
}
|
||||
],
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": []
|
||||
}
|
||||
|
|
@ -19,13 +19,13 @@
|
|||
],
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2022-08-03 12:20:52.738977",
|
||||
"modified": "2024-03-23 16:01:28.830117",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Block Module",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": []
|
||||
}
|
||||
|
|
@ -99,7 +99,7 @@
|
|||
}
|
||||
],
|
||||
"links": [],
|
||||
"modified": "2023-07-24 13:52:55.651462",
|
||||
"modified": "2024-03-23 16:01:30.075730",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Comment",
|
||||
|
|
@ -131,7 +131,7 @@
|
|||
}
|
||||
],
|
||||
"quick_entry": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"title_field": "comment_type",
|
||||
|
|
|
|||
|
|
@ -402,7 +402,7 @@
|
|||
"idx": 1,
|
||||
"links": [],
|
||||
"make_attachments_public": 1,
|
||||
"modified": "2024-02-09 12:10:01.200845",
|
||||
"modified": "2024-03-23 16:01:30.219380",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Communication",
|
||||
|
|
@ -459,7 +459,7 @@
|
|||
],
|
||||
"search_fields": "subject",
|
||||
"sender_field": "sender",
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"subject_field": "subject",
|
||||
|
|
|
|||
|
|
@ -278,13 +278,22 @@ class CommunicationEmailMixin:
|
|||
print_format=print_format, print_html=print_html, print_language=print_language
|
||||
)
|
||||
incoming_email_account = self.get_incoming_email_account()
|
||||
|
||||
reply_to = None
|
||||
|
||||
# If this is a reply to an existing email, set reply_to as the sender of the reply
|
||||
if self.in_reply_to:
|
||||
reply_to = self.get_mail_sender_with_displayname()
|
||||
elif incoming_email_account:
|
||||
reply_to = incoming_email_account.email_id
|
||||
|
||||
return {
|
||||
"recipients": recipients,
|
||||
"cc": cc,
|
||||
"bcc": bcc,
|
||||
"expose_recipients": "header",
|
||||
"sender": self.get_mail_sender_with_displayname(),
|
||||
"reply_to": incoming_email_account and incoming_email_account.email_id,
|
||||
"reply_to": reply_to,
|
||||
"subject": self.subject,
|
||||
"content": self.get_content(print_format=print_format),
|
||||
"reference_doctype": self.reference_doctype,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"actions": [],
|
||||
"creation": "2019-05-21 09:47:23.043960",
|
||||
"doctype": "DocType",
|
||||
"editable_grid": 1,
|
||||
|
|
@ -34,14 +35,16 @@
|
|||
}
|
||||
],
|
||||
"istable": 1,
|
||||
"modified": "2019-05-21 09:47:23.043960",
|
||||
"links": [],
|
||||
"modified": "2024-03-23 16:01:30.438791",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Communication Link",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"quick_entry": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1
|
||||
}
|
||||
|
|
@ -215,7 +215,7 @@
|
|||
}
|
||||
],
|
||||
"links": [],
|
||||
"modified": "2023-02-20 13:19:04.889081",
|
||||
"modified": "2024-03-23 16:02:14.726078",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Custom DocPerm",
|
||||
|
|
@ -235,7 +235,8 @@
|
|||
}
|
||||
],
|
||||
"read_only": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "ASC",
|
||||
"states": [],
|
||||
"title_field": "parent"
|
||||
}
|
||||
|
|
@ -50,7 +50,7 @@
|
|||
}
|
||||
],
|
||||
"links": [],
|
||||
"modified": "2022-08-03 12:20:52.985554",
|
||||
"modified": "2024-03-23 16:02:15.554679",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Custom Role",
|
||||
|
|
@ -70,7 +70,7 @@
|
|||
}
|
||||
],
|
||||
"read_only": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": []
|
||||
}
|
||||
|
|
@ -60,7 +60,7 @@
|
|||
"hide_toolbar": 1,
|
||||
"issingle": 1,
|
||||
"links": [],
|
||||
"modified": "2022-09-28 03:51:02.404681",
|
||||
"modified": "2024-03-23 16:02:16.856404",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Data Export",
|
||||
|
|
@ -78,7 +78,7 @@
|
|||
}
|
||||
],
|
||||
"quick_entry": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": []
|
||||
}
|
||||
|
|
@ -171,7 +171,7 @@
|
|||
],
|
||||
"hide_toolbar": 1,
|
||||
"links": [],
|
||||
"modified": "2024-01-30 17:08:05.566686",
|
||||
"modified": "2024-03-23 16:02:16.953820",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Data Import",
|
||||
|
|
@ -191,7 +191,7 @@
|
|||
"write": 1
|
||||
}
|
||||
],
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1
|
||||
|
|
|
|||
|
|
@ -27,10 +27,6 @@ frappe.listview_settings["Data Import"] = {
|
|||
if (imports_in_progress.includes(doc.name)) {
|
||||
status = "In Progress";
|
||||
}
|
||||
if (status === "Pending") {
|
||||
status = "Not Started";
|
||||
}
|
||||
|
||||
return [__(status), colors[status], "status,=," + doc.status];
|
||||
},
|
||||
formatters: {
|
||||
|
|
|
|||
|
|
@ -102,9 +102,13 @@ class Importer:
|
|||
log_index = 0
|
||||
|
||||
# Do not remove rows in case of retry after an error or pending data import
|
||||
if self.data_import.status == "Partial Success" and len(import_log) >= self.data_import.payload_count:
|
||||
if (
|
||||
self.data_import.status in ("Partial Success", "Error")
|
||||
and len(import_log) >= self.data_import.payload_count
|
||||
):
|
||||
# remove previous failures from import log only in case of retry after partial success
|
||||
import_log = [log for log in import_log if log.get("success")]
|
||||
frappe.db.delete("Data Import Log", {"success": 0, "data_import": self.data_import.name})
|
||||
|
||||
# get successfully imported rows
|
||||
imported_rows = []
|
||||
|
|
@ -213,13 +217,21 @@ class Importer:
|
|||
)
|
||||
|
||||
# set status
|
||||
failures = [log for log in import_log if not log.get("success")]
|
||||
if len(failures) == total_payload_count:
|
||||
status = "Pending"
|
||||
elif len(failures) > 0:
|
||||
successes = []
|
||||
failures = []
|
||||
for log in import_log:
|
||||
if log.get("success"):
|
||||
successes.append(log)
|
||||
else:
|
||||
failures.append(log)
|
||||
if len(failures) >= total_payload_count and len(successes) == 0:
|
||||
status = "Error"
|
||||
elif len(failures) > 0 and len(successes) > 0:
|
||||
status = "Partial Success"
|
||||
else:
|
||||
elif len(successes) == total_payload_count:
|
||||
status = "Success"
|
||||
else:
|
||||
status = "Pending"
|
||||
|
||||
if self.console:
|
||||
self.print_import_log(import_log)
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@
|
|||
"in_create": 1,
|
||||
"index_web_pages_for_search": 1,
|
||||
"links": [],
|
||||
"modified": "2021-12-29 11:19:19.646076",
|
||||
"modified": "2024-03-23 16:02:17.334396",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Data Import Log",
|
||||
|
|
@ -79,6 +79,7 @@
|
|||
"write": 1
|
||||
}
|
||||
],
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC"
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": []
|
||||
}
|
||||
|
|
@ -35,13 +35,13 @@
|
|||
"idx": 1,
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2022-08-03 12:20:54.832785",
|
||||
"modified": "2024-03-23 16:02:17.533639",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "DefaultValue",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": []
|
||||
}
|
||||
|
|
@ -60,7 +60,7 @@
|
|||
],
|
||||
"in_create": 1,
|
||||
"links": [],
|
||||
"modified": "2022-06-13 05:50:58.314908",
|
||||
"modified": "2024-03-23 16:02:17.664513",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Deleted Document",
|
||||
|
|
@ -73,7 +73,7 @@
|
|||
"role": "System Manager"
|
||||
}
|
||||
],
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"title_field": "deleted_name",
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ class DeletedDocument(Document):
|
|||
from frappe.query_builder.functions import Now
|
||||
|
||||
table = frappe.qb.DocType("Deleted Document")
|
||||
frappe.db.delete(table, filters=(table.modified < (Now() - Interval(days=days))))
|
||||
frappe.db.delete(table, filters=(table.creation < (Now() - Interval(days=days))))
|
||||
|
||||
|
||||
@frappe.whitelist()
|
||||
|
|
|
|||
|
|
@ -186,6 +186,7 @@
|
|||
},
|
||||
{
|
||||
"default": "0",
|
||||
"depends_on": "eval:!in_list(['Tab Break', 'Table'], doc.fieldtype)",
|
||||
"fieldname": "allow_in_quick_entry",
|
||||
"fieldtype": "Check",
|
||||
"label": "Allow in Quick Entry"
|
||||
|
|
@ -581,14 +582,14 @@
|
|||
"index_web_pages_for_search": 1,
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2024-02-01 15:55:44.007917",
|
||||
"modified": "2024-03-23 16:02:18.210626",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "DocField",
|
||||
"naming_rule": "Random",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "ASC",
|
||||
"states": []
|
||||
}
|
||||
|
|
@ -210,12 +210,13 @@
|
|||
"idx": 1,
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2023-02-20 13:21:45.071310",
|
||||
"modified": "2024-03-23 16:02:18.443496",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "DocPerm",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"sort_field": "modified",
|
||||
"sort_order": "ASC"
|
||||
"sort_field": "creation",
|
||||
"sort_order": "ASC",
|
||||
"states": []
|
||||
}
|
||||
|
|
@ -86,7 +86,7 @@
|
|||
],
|
||||
"in_create": 1,
|
||||
"links": [],
|
||||
"modified": "2023-06-15 18:02:51.877533",
|
||||
"modified": "2024-03-23 16:03:21.134272",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "DocShare",
|
||||
|
|
@ -106,7 +106,7 @@
|
|||
}
|
||||
],
|
||||
"read_only": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1
|
||||
|
|
|
|||
|
|
@ -333,7 +333,7 @@
|
|||
"label": "Default Print Format"
|
||||
},
|
||||
{
|
||||
"default": "modified",
|
||||
"default": "creation",
|
||||
"depends_on": "eval:!doc.istable",
|
||||
"fieldname": "sort_field",
|
||||
"fieldtype": "Data",
|
||||
|
|
@ -570,7 +570,7 @@
|
|||
"fieldtype": "Select",
|
||||
"label": "Naming Rule",
|
||||
"length": 40,
|
||||
"options": "\nSet by user\nAutoincrement\nBy fieldname\nBy \"Naming Series\" field\nExpression\nExpression (old style)\nRandom\nBy script"
|
||||
"options": "\nSet by user\nAutoincrement\nBy fieldname\nBy \"Naming Series\" field\nExpression\nExpression (old style)\nRandom\nUUID\nBy script"
|
||||
},
|
||||
{
|
||||
"fieldname": "migration_hash",
|
||||
|
|
@ -750,7 +750,7 @@
|
|||
"link_fieldname": "reference_doctype"
|
||||
}
|
||||
],
|
||||
"modified": "2023-12-01 18:37:16.799471",
|
||||
"modified": "2024-03-29 16:09:26.114720",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "DocType",
|
||||
|
|
@ -782,7 +782,7 @@
|
|||
"route": "doctype",
|
||||
"search_fields": "module",
|
||||
"show_name_in_global_search": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1,
|
||||
|
|
|
|||
|
|
@ -147,6 +147,7 @@ class DocType(Document):
|
|||
"Expression",
|
||||
"Expression (old style)",
|
||||
"Random",
|
||||
"UUID",
|
||||
"By script",
|
||||
]
|
||||
nsm_parent_field: DF.Data | None
|
||||
|
|
@ -868,9 +869,7 @@ class DocType(Document):
|
|||
def make_amendable(self):
|
||||
"""If is_submittable is set, add amended_from docfields."""
|
||||
if self.is_submittable:
|
||||
docfield_exists = frappe.get_all(
|
||||
"DocField", filters={"fieldname": "amended_from", "parent": self.name}, pluck="name", limit=1
|
||||
)
|
||||
docfield_exists = [f for f in self.fields if f.fieldname == "amended_from"]
|
||||
if not docfield_exists:
|
||||
self.append(
|
||||
"fields",
|
||||
|
|
|
|||
|
|
@ -61,14 +61,15 @@
|
|||
"index_web_pages_for_search": 1,
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2020-09-24 14:19:05.549835",
|
||||
"modified": "2024-03-23 16:03:21.873210",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "DocType Action",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"quick_entry": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1
|
||||
}
|
||||
|
|
@ -74,14 +74,14 @@
|
|||
"index_web_pages_for_search": 1,
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2021-07-31 15:23:12.237491",
|
||||
"modified": "2024-03-23 16:03:22.273487",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "DocType Link",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"quick_entry": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1
|
||||
}
|
||||
|
|
@ -37,13 +37,13 @@
|
|||
"index_web_pages_for_search": 1,
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2021-12-14 14:14:55.716378",
|
||||
"modified": "2024-03-23 16:03:22.416470",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "DocType State",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1
|
||||
|
|
|
|||
|
|
@ -36,14 +36,15 @@
|
|||
"index_web_pages_for_search": 1,
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2020-09-08 10:19:56.192949",
|
||||
"modified": "2024-03-23 16:03:22.677527",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Document Naming Rule Condition",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"quick_entry": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1
|
||||
}
|
||||
|
|
@ -143,7 +143,7 @@
|
|||
"icon": "fa fa-sort-by-order",
|
||||
"issingle": 1,
|
||||
"links": [],
|
||||
"modified": "2023-06-20 17:47:52.204139",
|
||||
"modified": "2024-03-23 16:03:22.769200",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Document Naming Settings",
|
||||
|
|
@ -159,7 +159,7 @@
|
|||
"write": 1
|
||||
}
|
||||
],
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": []
|
||||
}
|
||||
|
|
@ -46,7 +46,7 @@
|
|||
"in_create": 1,
|
||||
"index_web_pages_for_search": 1,
|
||||
"links": [],
|
||||
"modified": "2022-01-14 13:57:28.050678",
|
||||
"modified": "2024-03-23 16:03:22.892995",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Document Share Key",
|
||||
|
|
@ -67,7 +67,7 @@
|
|||
}
|
||||
],
|
||||
"read_only": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": []
|
||||
}
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"actions": [],
|
||||
"autoname": "field:domain",
|
||||
"creation": "2017-05-03 15:07:39.752820",
|
||||
"doctype": "DocType",
|
||||
|
|
@ -17,7 +18,8 @@
|
|||
"unique": 1
|
||||
}
|
||||
],
|
||||
"modified": "2020-09-18 17:26:09.703215",
|
||||
"links": [],
|
||||
"modified": "2024-03-23 16:03:22.994251",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Domain",
|
||||
|
|
@ -48,7 +50,8 @@
|
|||
],
|
||||
"quick_entry": 1,
|
||||
"search_fields": "domain",
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"title_field": "domain"
|
||||
}
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
],
|
||||
"issingle": 1,
|
||||
"links": [],
|
||||
"modified": "2022-08-03 12:20:53.256607",
|
||||
"modified": "2024-03-23 16:03:23.087355",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Domain Settings",
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
}
|
||||
],
|
||||
"quick_entry": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
"actions": [],
|
||||
"creation": "2017-01-13 04:55:18.835023",
|
||||
"doctype": "DocType",
|
||||
"editable_grid": 1,
|
||||
|
|
@ -34,14 +35,16 @@
|
|||
}
|
||||
],
|
||||
"istable": 1,
|
||||
"modified": "2019-10-10 22:05:54.736093",
|
||||
"links": [],
|
||||
"modified": "2024-03-23 16:03:23.469424",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Dynamic Link",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"quick_entry": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1
|
||||
}
|
||||
|
|
@ -70,7 +70,7 @@
|
|||
"idx": 1,
|
||||
"in_create": 1,
|
||||
"links": [],
|
||||
"modified": "2023-12-08 15:52:37.525003",
|
||||
"modified": "2024-03-23 16:03:25.381120",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Error Log",
|
||||
|
|
@ -88,7 +88,7 @@
|
|||
"write": 1
|
||||
}
|
||||
],
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"title_field": "method"
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class ErrorLog(Document):
|
|||
@staticmethod
|
||||
def clear_old_logs(days=30):
|
||||
table = frappe.qb.DocType("Error Log")
|
||||
frappe.db.delete(table, filters=(table.modified < (Now() - Interval(days=days))))
|
||||
frappe.db.delete(table, filters=(table.creation < (Now() - Interval(days=days))))
|
||||
|
||||
|
||||
@frappe.whitelist()
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ frappe.listview_settings["Error Log"] = {
|
|||
return [__("Not Seen"), "red", "seen,=,0"];
|
||||
}
|
||||
},
|
||||
order_by: "seen asc, modified desc",
|
||||
order_by: "creation desc",
|
||||
onload: function (listview) {
|
||||
listview.page.add_menu_item(__("Clear Error Logs"), function () {
|
||||
frappe.call({
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@
|
|||
"icon": "fa fa-file",
|
||||
"idx": 1,
|
||||
"links": [],
|
||||
"modified": "2023-12-08 15:52:37.525003",
|
||||
"modified": "2024-03-23 16:03:25.814224",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "File",
|
||||
|
|
@ -216,7 +216,7 @@
|
|||
"write": 1
|
||||
}
|
||||
],
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"title_field": "file_name",
|
||||
|
|
|
|||
|
|
@ -18,14 +18,14 @@
|
|||
],
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2022-08-03 12:20:53.381248",
|
||||
"modified": "2024-03-23 16:03:27.198356",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Has Domain",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"quick_entry": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1
|
||||
|
|
|
|||
|
|
@ -22,13 +22,13 @@
|
|||
"idx": 1,
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2022-08-03 12:20:54.382064",
|
||||
"modified": "2024-03-23 16:03:27.291168",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Has Role",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": []
|
||||
}
|
||||
|
|
@ -36,14 +36,15 @@
|
|||
],
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2020-05-12 10:09:49.148087",
|
||||
"modified": "2024-03-23 16:03:27.892752",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Installed Application",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"quick_entry": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1
|
||||
}
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
],
|
||||
"issingle": 1,
|
||||
"links": [],
|
||||
"modified": "2020-05-12 10:09:14.310622",
|
||||
"modified": "2024-03-23 16:03:27.992755",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Installed Applications",
|
||||
|
|
@ -36,7 +36,8 @@
|
|||
}
|
||||
],
|
||||
"quick_entry": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1
|
||||
}
|
||||
|
|
@ -51,7 +51,7 @@
|
|||
"icon": "fa fa-globe",
|
||||
"in_create": 1,
|
||||
"links": [],
|
||||
"modified": "2023-04-13 13:48:38.127995",
|
||||
"modified": "2024-03-23 16:03:28.477169",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Language",
|
||||
|
|
@ -66,13 +66,13 @@
|
|||
"write": 1
|
||||
},
|
||||
{
|
||||
"role": "All",
|
||||
"read": 1
|
||||
"read": 1,
|
||||
"role": "All"
|
||||
}
|
||||
],
|
||||
"search_fields": "language_name",
|
||||
"show_title_field_in_link": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"title_field": "language_name",
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
# Copyright (c) 2015, Frappe Technologies and contributors
|
||||
# License: MIT. See LICENSE
|
||||
|
||||
import json
|
||||
import re
|
||||
|
||||
import frappe
|
||||
|
|
@ -47,38 +46,14 @@ def validate_with_regex(name, label):
|
|||
)
|
||||
|
||||
|
||||
def export_languages_json():
|
||||
"""Export list of all languages"""
|
||||
languages = frappe.get_all("Language", fields=["name", "language_name"])
|
||||
languages = [{"name": d.language_name, "code": d.name} for d in languages]
|
||||
|
||||
languages.sort(key=lambda a: a["code"])
|
||||
|
||||
with open(frappe.get_app_path("frappe", "geo", "languages.json"), "w") as f:
|
||||
f.write(frappe.as_json(languages))
|
||||
|
||||
|
||||
def sync_languages():
|
||||
"""Sync frappe/geo/languages.json with Language"""
|
||||
with open(frappe.get_app_path("frappe", "geo", "languages.json")) as f:
|
||||
data = json.loads(f.read())
|
||||
"""Create Language records from frappe/geo/languages.csv"""
|
||||
from csv import DictReader
|
||||
|
||||
for l in data:
|
||||
if not frappe.db.exists("Language", l["code"]):
|
||||
frappe.get_doc(
|
||||
{
|
||||
"doctype": "Language",
|
||||
"language_code": l["code"],
|
||||
"language_name": l["name"],
|
||||
"enabled": 1,
|
||||
}
|
||||
).insert()
|
||||
|
||||
|
||||
def update_language_names():
|
||||
"""Update frappe/geo/languages.json names (for use via patch)"""
|
||||
with open(frappe.get_app_path("frappe", "geo", "languages.json")) as f:
|
||||
data = json.loads(f.read())
|
||||
|
||||
for l in data:
|
||||
frappe.db.set_value("Language", l["code"], "language_name", l["name"])
|
||||
with open(frappe.get_app_path("frappe", "geo", "languages.csv")) as f:
|
||||
reader = DictReader(f)
|
||||
for row in reader:
|
||||
if not frappe.db.exists("Language", row["language_code"]):
|
||||
doc = frappe.new_doc("Language")
|
||||
doc.update(row)
|
||||
doc.insert()
|
||||
|
|
|
|||
|
|
@ -22,13 +22,14 @@
|
|||
"index_web_pages_for_search": 1,
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2020-10-08 17:22:04.690348",
|
||||
"modified": "2024-03-23 16:03:29.303855",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Log Setting User",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"actions": [],
|
||||
"creation": "2020-10-08 12:12:21.694424",
|
||||
"creation": "2023-02-22 16:18:29.749940",
|
||||
"doctype": "DocType",
|
||||
"editable_grid": 1,
|
||||
"engine": "InnoDB",
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
"index_web_pages_for_search": 1,
|
||||
"issingle": 1,
|
||||
"links": [],
|
||||
"modified": "2022-06-11 02:17:30.803721",
|
||||
"modified": "2024-03-23 16:03:29.392292",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Log Settings",
|
||||
|
|
@ -36,7 +36,7 @@
|
|||
}
|
||||
],
|
||||
"quick_entry": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ def clear_log_table(doctype, days=90):
|
|||
frappe.db.sql(
|
||||
f"""INSERT INTO `{temporary}`
|
||||
SELECT * FROM `{original}`
|
||||
WHERE `{original}`.`modified` > NOW() - INTERVAL '{days}' DAY"""
|
||||
WHERE `{original}`.`creation` > NOW() - INTERVAL '{days}' DAY"""
|
||||
)
|
||||
frappe.db.sql_ddl(f"RENAME TABLE `{original}` TO `{backup}`, `{temporary}` TO `{original}`")
|
||||
except Exception:
|
||||
|
|
|
|||
|
|
@ -31,13 +31,13 @@
|
|||
"index_web_pages_for_search": 1,
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2022-06-13 02:51:36.857786",
|
||||
"modified": "2024-03-23 16:03:29.489001",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Logs To Clear",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": []
|
||||
}
|
||||
}
|
||||
|
|
@ -123,7 +123,7 @@
|
|||
"link_fieldname": "module"
|
||||
}
|
||||
],
|
||||
"modified": "2023-12-08 15:52:37.525003",
|
||||
"modified": "2024-03-23 16:03:29.918362",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Module Def",
|
||||
|
|
@ -159,7 +159,7 @@
|
|||
}
|
||||
],
|
||||
"show_name_in_global_search": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
"link_fieldname": "module_profile"
|
||||
}
|
||||
],
|
||||
"modified": "2021-12-03 15:47:21.296443",
|
||||
"modified": "2024-03-23 16:03:30.237678",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Module Profile",
|
||||
|
|
@ -60,7 +60,8 @@
|
|||
"write": 1
|
||||
}
|
||||
],
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1
|
||||
}
|
||||
|
|
@ -18,9 +18,7 @@
|
|||
"fieldtype": "Data",
|
||||
"in_list_view": 1,
|
||||
"label": "Item Label",
|
||||
"mandatory_depends_on": "eval:doc.item_type == 'Route' || doc.item_type == 'Action'",
|
||||
"show_days": 1,
|
||||
"show_seconds": 1
|
||||
"mandatory_depends_on": "eval:doc.item_type == 'Route' || doc.item_type == 'Action'"
|
||||
},
|
||||
{
|
||||
"columns": 2,
|
||||
|
|
@ -29,27 +27,21 @@
|
|||
"in_list_view": 1,
|
||||
"label": "Item Type",
|
||||
"options": "Route\nAction\nSeparator",
|
||||
"read_only_depends_on": "eval:doc.is_standard",
|
||||
"show_days": 1,
|
||||
"show_seconds": 1
|
||||
"read_only_depends_on": "eval:doc.is_standard"
|
||||
},
|
||||
{
|
||||
"default": "0",
|
||||
"fieldname": "hidden",
|
||||
"fieldtype": "Check",
|
||||
"in_list_view": 1,
|
||||
"label": "Hidden",
|
||||
"show_days": 1,
|
||||
"show_seconds": 1
|
||||
"label": "Hidden"
|
||||
},
|
||||
{
|
||||
"default": "0",
|
||||
"fieldname": "is_standard",
|
||||
"fieldtype": "Check",
|
||||
"label": "Is Standard",
|
||||
"read_only": 1,
|
||||
"show_days": 1,
|
||||
"show_seconds": 1
|
||||
"read_only": 1
|
||||
},
|
||||
{
|
||||
"columns": 4,
|
||||
|
|
@ -59,9 +51,7 @@
|
|||
"in_list_view": 1,
|
||||
"label": "Route",
|
||||
"mandatory_depends_on": "eval:doc.item_type == 'Route'",
|
||||
"read_only_depends_on": "eval:doc.is_standard",
|
||||
"show_days": 1,
|
||||
"show_seconds": 1
|
||||
"read_only_depends_on": "eval:doc.is_standard"
|
||||
},
|
||||
{
|
||||
"depends_on": "eval:doc.item_type == 'Action'",
|
||||
|
|
@ -69,21 +59,20 @@
|
|||
"fieldtype": "Data",
|
||||
"label": "Action",
|
||||
"mandatory_depends_on": "eval:doc.item_type == 'Action'",
|
||||
"read_only_depends_on": "eval:doc.is_standard",
|
||||
"show_days": 1,
|
||||
"show_seconds": 1
|
||||
"read_only_depends_on": "eval:doc.is_standard"
|
||||
}
|
||||
],
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2020-11-02 10:57:37.709262",
|
||||
"modified": "2024-03-23 16:03:30.447346",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Navbar Item",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"quick_entry": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1
|
||||
}
|
||||
|
|
@ -17,57 +17,43 @@
|
|||
{
|
||||
"fieldname": "app_logo",
|
||||
"fieldtype": "Attach Image",
|
||||
"label": "Application Logo",
|
||||
"show_days": 1,
|
||||
"show_seconds": 1
|
||||
"label": "Application Logo"
|
||||
},
|
||||
{
|
||||
"fieldname": "settings_dropdown",
|
||||
"fieldtype": "Table",
|
||||
"label": "Settings Dropdown",
|
||||
"options": "Navbar Item",
|
||||
"show_days": 1,
|
||||
"show_seconds": 1
|
||||
"options": "Navbar Item"
|
||||
},
|
||||
{
|
||||
"fieldname": "help_dropdown",
|
||||
"fieldtype": "Table",
|
||||
"label": "Help Dropdown",
|
||||
"options": "Navbar Item",
|
||||
"show_days": 1,
|
||||
"show_seconds": 1
|
||||
"options": "Navbar Item"
|
||||
},
|
||||
{
|
||||
"fieldname": "section_break_2",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Dropdowns",
|
||||
"show_days": 1,
|
||||
"show_seconds": 1
|
||||
"label": "Dropdowns"
|
||||
},
|
||||
{
|
||||
"fieldname": "logo_section",
|
||||
"fieldtype": "Section Break",
|
||||
"label": "Application Logo",
|
||||
"show_days": 1,
|
||||
"show_seconds": 1
|
||||
"label": "Application Logo"
|
||||
},
|
||||
{
|
||||
"fieldname": "column_break_3",
|
||||
"fieldtype": "Column Break",
|
||||
"show_days": 1,
|
||||
"show_seconds": 1
|
||||
"fieldtype": "Column Break"
|
||||
},
|
||||
{
|
||||
"fieldname": "logo_width",
|
||||
"fieldtype": "Int",
|
||||
"label": "Logo Width",
|
||||
"show_days": 1,
|
||||
"show_seconds": 1
|
||||
"label": "Logo Width"
|
||||
}
|
||||
],
|
||||
"issingle": 1,
|
||||
"links": [],
|
||||
"modified": "2020-08-06 18:11:29.955835",
|
||||
"modified": "2024-03-23 16:03:30.561647",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Navbar Settings",
|
||||
|
|
@ -85,7 +71,8 @@
|
|||
}
|
||||
],
|
||||
"quick_entry": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1
|
||||
}
|
||||
|
|
@ -50,7 +50,7 @@
|
|||
"link_fieldname": "package"
|
||||
}
|
||||
],
|
||||
"modified": "2021-09-05 13:15:01.130982",
|
||||
"modified": "2024-03-23 16:03:33.307130",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Package",
|
||||
|
|
@ -70,7 +70,8 @@
|
|||
"write": 1
|
||||
}
|
||||
],
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1
|
||||
}
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
],
|
||||
"index_web_pages_for_search": 1,
|
||||
"links": [],
|
||||
"modified": "2021-09-05 21:30:04.796090",
|
||||
"modified": "2024-03-23 16:03:33.422131",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Package Import",
|
||||
|
|
@ -59,7 +59,8 @@
|
|||
"write": 1
|
||||
}
|
||||
],
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1
|
||||
}
|
||||
|
|
@ -69,7 +69,7 @@
|
|||
],
|
||||
"index_web_pages_for_search": 1,
|
||||
"links": [],
|
||||
"modified": "2021-09-05 16:04:32.860988",
|
||||
"modified": "2024-03-23 16:03:33.536719",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Package Release",
|
||||
|
|
@ -89,7 +89,8 @@
|
|||
"write": 1
|
||||
}
|
||||
],
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1
|
||||
}
|
||||
|
|
@ -102,7 +102,7 @@
|
|||
"icon": "fa fa-file",
|
||||
"idx": 1,
|
||||
"links": [],
|
||||
"modified": "2023-12-08 15:52:37.525003",
|
||||
"modified": "2024-03-23 16:03:33.657255",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Page",
|
||||
|
|
@ -128,7 +128,7 @@
|
|||
"write": 1
|
||||
}
|
||||
],
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
"icon": "fa fa-cog",
|
||||
"idx": 1,
|
||||
"links": [],
|
||||
"modified": "2023-06-07 00:00:01.369265",
|
||||
"modified": "2024-03-23 16:03:34.014409",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Patch Log",
|
||||
|
|
@ -61,7 +61,7 @@
|
|||
}
|
||||
],
|
||||
"quick_entry": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"title_field": "patch",
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@
|
|||
"is_virtual": 1,
|
||||
"issingle": 1,
|
||||
"links": [],
|
||||
"modified": "2024-01-10 14:17:49.722593",
|
||||
"modified": "2024-03-23 16:03:34.140177",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Permission Inspector",
|
||||
|
|
@ -84,7 +84,7 @@
|
|||
"write": 1
|
||||
}
|
||||
],
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": []
|
||||
}
|
||||
|
|
@ -105,7 +105,7 @@
|
|||
],
|
||||
"in_create": 1,
|
||||
"links": [],
|
||||
"modified": "2024-03-07 12:01:58.209879",
|
||||
"modified": "2024-03-23 16:03:34.835357",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Prepared Report",
|
||||
|
|
@ -134,7 +134,7 @@
|
|||
"share": 1
|
||||
}
|
||||
],
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ class PreparedReport(Document):
|
|||
def clear_old_logs(days=30):
|
||||
prepared_reports_to_delete = frappe.get_all(
|
||||
"Prepared Report",
|
||||
filters={"modified": ["<", frappe.utils.add_days(frappe.utils.now(), -days)]},
|
||||
filters={"creation": ["<", frappe.utils.add_days(frappe.utils.now(), -days)]},
|
||||
)
|
||||
|
||||
for batch in frappe.utils.create_batch(prepared_reports_to_delete, 100):
|
||||
|
|
@ -196,7 +196,7 @@ def expire_stalled_report():
|
|||
"Prepared Report",
|
||||
{
|
||||
"status": "Started",
|
||||
"modified": ("<", add_to_date(now(), seconds=-FAILURE_THRESHOLD, as_datetime=True)),
|
||||
"creation": ("<", add_to_date(now(), seconds=-FAILURE_THRESHOLD, as_datetime=True)),
|
||||
},
|
||||
{
|
||||
"status": "Failed",
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ class Recorder(Document):
|
|||
requests = Recorder.get_filtered_requests(filters)[start : start + page_length]
|
||||
|
||||
if order_by_statment := order_by:
|
||||
order_by_statment = order_by_statment.split(",")[0]
|
||||
if "." in order_by_statment:
|
||||
order_by_statment = order_by_statment.split(".")[1]
|
||||
|
||||
|
|
|
|||
|
|
@ -94,13 +94,13 @@
|
|||
"is_virtual": 1,
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2023-08-07 13:12:23.496002",
|
||||
"modified": "2024-03-23 16:03:36.052756",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Recorder Query",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": []
|
||||
}
|
||||
|
|
@ -191,7 +191,7 @@
|
|||
"idx": 1,
|
||||
"index_web_pages_for_search": 1,
|
||||
"links": [],
|
||||
"modified": "2024-01-03 15:29:01.460404",
|
||||
"modified": "2024-03-23 16:03:36.343177",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Core",
|
||||
"name": "Report",
|
||||
|
|
@ -240,7 +240,7 @@
|
|||
}
|
||||
],
|
||||
"show_name_in_global_search": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_field": "creation",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1
|
||||
|
|
|
|||
|
|
@ -315,7 +315,7 @@ class Report(Document):
|
|||
elif params.get("order_by"):
|
||||
order_by = params.get("order_by")
|
||||
else:
|
||||
order_by = Report._format([self.ref_doctype, "modified"]) + " desc"
|
||||
order_by = Report._format([self.ref_doctype, "creation"]) + " desc"
|
||||
|
||||
if params.get("sort_by_next"):
|
||||
order_by += (
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
"doctype": "Report",
|
||||
"is_standard": "No",
|
||||
"javascript": null,
|
||||
"json": "{\"filters\":[],\"columns\":[[\"name\",\"User\"],[\"user_type\",\"User\"],[\"first_name\",\"User\"],[\"last_name\",\"User\"],[\"last_active\",\"User\"],[\"role\",\"Has Role\"]],\"sort_by\":\"User.modified\",\"sort_order\":\"desc\",\"sort_by_next\":null,\"sort_order_next\":\"desc\"}",
|
||||
"json": "{\"filters\":[],\"columns\":[[\"name\",\"User\"],[\"user_type\",\"User\"],[\"first_name\",\"User\"],[\"last_name\",\"User\"],[\"last_active\",\"User\"],[\"role\",\"Has Role\"]],\"sort_by\":\"User.creation\",\"sort_order\":\"desc\",\"sort_by_next\":null,\"sort_order_next\":\"desc\"}",
|
||||
"modified": "2016-09-01 02:59:07.728890",
|
||||
"module": "Core",
|
||||
"name": "User Activity Report",
|
||||
|
|
@ -14,4 +14,4 @@
|
|||
"ref_doctype": "User",
|
||||
"report_name": "User Activity Report",
|
||||
"report_type": "Report Builder"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue