mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-20 13:39:18 +00:00
Merge pull request #49694 from pateljannat/sales-data
chore: update sales_data from site_info
This commit is contained in:
@@ -5,5 +5,6 @@ from erpnext.utilities.activation import get_level
|
|||||||
|
|
||||||
class TestActivation(IntegrationTestCase):
|
class TestActivation(IntegrationTestCase):
|
||||||
def test_activation(self):
|
def test_activation(self):
|
||||||
levels = get_level()
|
site_info = {"activation": {"activation_level": 0, "sales_data": []}}
|
||||||
|
levels = get_level(site_info)
|
||||||
self.assertTrue(levels)
|
self.assertTrue(levels)
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ def get_site_info(site_info):
|
|||||||
if company:
|
if company:
|
||||||
domain = frappe.get_cached_value("Company", cstr(company), "domain")
|
domain = frappe.get_cached_value("Company", cstr(company), "domain")
|
||||||
|
|
||||||
return {"company": company, "domain": domain, "activation": get_level()}
|
return {"company": company, "domain": domain, "activation": get_level(site_info)}
|
||||||
|
|
||||||
|
|
||||||
@contextmanager
|
@contextmanager
|
||||||
|
|||||||
@@ -9,9 +9,9 @@ from frappe.core.doctype.installed_applications.installed_applications import ge
|
|||||||
import erpnext
|
import erpnext
|
||||||
|
|
||||||
|
|
||||||
def get_level():
|
def get_level(site_info):
|
||||||
activation_level = 0
|
activation_level = site_info.get("activation", {}).get("activation_level", 0)
|
||||||
sales_data = []
|
sales_data = site_info.get("activation", {}).get("sales_data", [])
|
||||||
min_count = 0
|
min_count = 0
|
||||||
doctypes = {
|
doctypes = {
|
||||||
"Asset": 5,
|
"Asset": 5,
|
||||||
|
|||||||
Reference in New Issue
Block a user