mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-20 13:39:18 +00:00
fix: test
This commit is contained in:
@@ -15,12 +15,12 @@ class TestPOSProfile(unittest.TestCase):
|
|||||||
pos_profile = get_pos_profile("_Test Company") or {}
|
pos_profile = get_pos_profile("_Test Company") or {}
|
||||||
if pos_profile:
|
if pos_profile:
|
||||||
doc = frappe.get_doc("POS Profile", pos_profile.get("name"))
|
doc = frappe.get_doc("POS Profile", pos_profile.get("name"))
|
||||||
doc.append('item_groups', {'item_group': '_Test Item Group'})
|
doc.set('item_groups', [{'item_group': '_Test Item Group'}])
|
||||||
doc.append('customer_groups', {'customer_group': '_Test Customer Group'})
|
doc.set('customer_groups', [{'customer_group': '_Test Customer Group'}])
|
||||||
doc.save()
|
doc.save()
|
||||||
items = get_items_list(doc, doc.company)
|
items = get_items_list(doc, doc.company)
|
||||||
customers = get_customers_list(doc)
|
customers = get_customers_list(doc)
|
||||||
|
|
||||||
products_count = frappe.db.sql(""" select count(name) from tabItem where item_group = '_Test Item Group'""", as_list=1)
|
products_count = frappe.db.sql(""" select count(name) from tabItem where item_group = '_Test Item Group'""", as_list=1)
|
||||||
customers_count = frappe.db.sql(""" select count(name) from tabCustomer where customer_group = '_Test Customer Group'""")
|
customers_count = frappe.db.sql(""" select count(name) from tabCustomer where customer_group = '_Test Customer Group'""")
|
||||||
|
|
||||||
|
|||||||
@@ -189,6 +189,7 @@ def get_items_list(pos_profile, company):
|
|||||||
where
|
where
|
||||||
i.disabled = 0 and i.has_variants = 0 and i.is_sales_item = 1
|
i.disabled = 0 and i.has_variants = 0 and i.is_sales_item = 1
|
||||||
{cond}
|
{cond}
|
||||||
|
group by i.item_code
|
||||||
""".format(cond=cond), tuple([company] + args_list), as_dict=1)
|
""".format(cond=cond), tuple([company] + args_list), as_dict=1)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user