mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-03 08:32:24 +00:00
Merge remote-tracking branch 'upstream/version-15-hotfix' into mergify/bp/version-15-hotfix/pr-49875
This commit is contained in:
@@ -68,9 +68,9 @@ def patched_requests_get(*args, **kwargs):
|
||||
if kwargs["params"].get("date") and kwargs["params"].get("from") and kwargs["params"].get("to"):
|
||||
if test_exchange_values.get(kwargs["params"]["date"]):
|
||||
return PatchResponse({"result": test_exchange_values[kwargs["params"]["date"]]}, 200)
|
||||
elif args[0].startswith("https://api.frankfurter.app") and kwargs.get("params"):
|
||||
elif args[0].startswith("https://api.frankfurter.dev") and kwargs.get("params"):
|
||||
if kwargs["params"].get("base") and kwargs["params"].get("symbols"):
|
||||
date = args[0].replace("https://api.frankfurter.app/", "")
|
||||
date = args[0].replace("https://api.frankfurter.dev/v1/", "")
|
||||
if test_exchange_values.get(date):
|
||||
return PatchResponse(
|
||||
{"rates": {kwargs["params"].get("symbols"): test_exchange_values.get(date)}}, 200
|
||||
@@ -149,7 +149,7 @@ class TestCurrencyExchange(unittest.TestCase):
|
||||
self.assertEqual(flt(exchange_rate, 3), 65.1)
|
||||
|
||||
settings = frappe.get_single("Currency Exchange Settings")
|
||||
settings.service_provider = "frankfurter.app"
|
||||
settings.service_provider = "frankfurter.dev"
|
||||
settings.save()
|
||||
|
||||
def test_exchange_rate_strict(self, mock_get):
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
"idx": 1,
|
||||
"is_tree": 1,
|
||||
"links": [],
|
||||
"modified": "2023-06-02 13:40:34.435822",
|
||||
"modified": "2025-12-02 13:58:03.378607",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Setup",
|
||||
"name": "Customer Group",
|
||||
@@ -208,9 +208,11 @@
|
||||
"share": 1
|
||||
}
|
||||
],
|
||||
"row_format": "Dynamic",
|
||||
"search_fields": "parent_customer_group",
|
||||
"show_name_in_global_search": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"states": []
|
||||
}
|
||||
"states": [],
|
||||
"translated_doctype": 1
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ from frappe.permissions import (
|
||||
remove_user_permission,
|
||||
)
|
||||
from frappe.utils import cstr, getdate, today, validate_email_address
|
||||
from frappe.utils.deprecations import deprecated
|
||||
from frappe.utils.nestedset import NestedSet
|
||||
|
||||
from erpnext.utilities.transaction_base import delete_events
|
||||
@@ -88,9 +89,6 @@ class Employee(NestedSet):
|
||||
if not self.has_value_changed("user_id") and not self.has_value_changed("create_user_permission"):
|
||||
return
|
||||
|
||||
if not has_permission("User Permission", ptype="write", raise_exception=False):
|
||||
return
|
||||
|
||||
employee_user_permission_exists = frappe.db.exists(
|
||||
"User Permission", {"allow": "Employee", "for_value": self.name, "user": self.user_id}
|
||||
)
|
||||
@@ -251,8 +249,9 @@ def validate_employee_role(doc, method=None, ignore_emp_check=False):
|
||||
doc.get("roles").remove(doc.get("roles", {"role": "Employee Self Service"})[0])
|
||||
|
||||
|
||||
@deprecated
|
||||
def update_user_permissions(doc, method):
|
||||
# called via User hook
|
||||
# formerly called via User hook
|
||||
if "Employee" in [d.role for d in doc.get("roles")]:
|
||||
if not has_permission("User Permission", ptype="write", raise_exception=False):
|
||||
return
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
"is_tree": 1,
|
||||
"links": [],
|
||||
"max_attachments": 3,
|
||||
"modified": "2024-01-30 14:08:38.485616",
|
||||
"modified": "2025-12-02 13:58:30.018021",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Setup",
|
||||
"name": "Item Group",
|
||||
@@ -202,9 +202,11 @@
|
||||
"share": 1
|
||||
}
|
||||
],
|
||||
"row_format": "Dynamic",
|
||||
"search_fields": "parent_item_group",
|
||||
"show_name_in_global_search": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"states": []
|
||||
}
|
||||
"states": [],
|
||||
"translated_doctype": 1
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
{
|
||||
"bold": 1,
|
||||
"default": "0",
|
||||
"description": "Only leaf nodes are allowed in transaction",
|
||||
"fieldname": "is_group",
|
||||
"fieldtype": "Check",
|
||||
"in_list_view": 1,
|
||||
@@ -107,7 +108,7 @@
|
||||
"idx": 1,
|
||||
"is_tree": 1,
|
||||
"links": [],
|
||||
"modified": "2022-12-24 11:16:12.486719",
|
||||
"modified": "2025-12-02 13:57:57.814686",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Setup",
|
||||
"name": "Supplier Group",
|
||||
@@ -168,8 +169,10 @@
|
||||
"share": 1
|
||||
}
|
||||
],
|
||||
"row_format": "Dynamic",
|
||||
"show_name_in_global_search": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "ASC",
|
||||
"states": []
|
||||
}
|
||||
"states": [],
|
||||
"translated_doctype": 1
|
||||
}
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
{
|
||||
"bold": 1,
|
||||
"default": "0",
|
||||
"description": "Only leaf nodes are allowed in transaction",
|
||||
"fieldname": "is_group",
|
||||
"fieldtype": "Check",
|
||||
"in_list_view": 1,
|
||||
@@ -123,7 +124,7 @@
|
||||
"idx": 1,
|
||||
"is_tree": 1,
|
||||
"links": [],
|
||||
"modified": "2022-12-24 11:16:39.964956",
|
||||
"modified": "2025-12-02 13:58:55.190485",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Setup",
|
||||
"name": "Territory",
|
||||
@@ -186,9 +187,11 @@
|
||||
"share": 1
|
||||
}
|
||||
],
|
||||
"row_format": "Dynamic",
|
||||
"search_fields": "parent_territory,territory_manager",
|
||||
"show_name_in_global_search": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"states": []
|
||||
}
|
||||
"states": [],
|
||||
"translated_doctype": 1
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ def setup_currency_exchange():
|
||||
ces.set("result_key", [])
|
||||
ces.set("req_params", [])
|
||||
|
||||
ces.api_endpoint = "https://api.frankfurter.app/{transaction_date}"
|
||||
ces.api_endpoint = "https://api.frankfurter.dev/v1/{transaction_date}"
|
||||
ces.append("result_key", {"key": "rates"})
|
||||
ces.append("result_key", {"key": "{to_currency}"})
|
||||
ces.append("req_params", {"key": "base", "value": "{from_currency}"})
|
||||
|
||||
Reference in New Issue
Block a user