mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-18 09:47:14 +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 {}
|
||||
if pos_profile:
|
||||
doc = frappe.get_doc("POS Profile", pos_profile.get("name"))
|
||||
doc.append('item_groups', {'item_group': '_Test Item Group'})
|
||||
doc.append('customer_groups', {'customer_group': '_Test Customer Group'})
|
||||
doc.set('item_groups', [{'item_group': '_Test Item Group'}])
|
||||
doc.set('customer_groups', [{'customer_group': '_Test Customer Group'}])
|
||||
doc.save()
|
||||
items = get_items_list(doc, doc.company)
|
||||
customers = get_customers_list(doc)
|
||||
|
||||
|
||||
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'""")
|
||||
|
||||
|
||||
@@ -189,6 +189,7 @@ def get_items_list(pos_profile, company):
|
||||
where
|
||||
i.disabled = 0 and i.has_variants = 0 and i.is_sales_item = 1
|
||||
{cond}
|
||||
group by i.item_code
|
||||
""".format(cond=cond), tuple([company] + args_list), as_dict=1)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user