mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-08 15:42:52 +00:00
fix: Do not use random customers
This commit is contained in:
@@ -14,12 +14,10 @@ class TestMapper(unittest.TestCase):
|
|||||||
|
|
||||||
make_test_records("Item")
|
make_test_records("Item")
|
||||||
items = frappe.get_all("Item", fields = ["name", "item_code"], filters = {'is_sales_item': 1, 'has_variants': 0, 'disabled': 0})
|
items = frappe.get_all("Item", fields = ["name", "item_code"], filters = {'is_sales_item': 1, 'has_variants': 0, 'disabled': 0})
|
||||||
customers = frappe.get_all("Customer")
|
if items:
|
||||||
if items and customers:
|
|
||||||
# Make source docs (quotations) and a target doc (sales order)
|
# Make source docs (quotations) and a target doc (sales order)
|
||||||
customer = random.choice(customers).name
|
qtn1, item_list_1 = self.make_quotation(items, '_Test Customer')
|
||||||
qtn1, item_list_1 = self.make_quotation(items, customer)
|
qtn2, item_list_2 = self.make_quotation(items, '_Test Customer')
|
||||||
qtn2, item_list_2 = self.make_quotation(items, customer)
|
|
||||||
so, item_list_3 = self.make_sales_order()
|
so, item_list_3 = self.make_sales_order()
|
||||||
|
|
||||||
# Map source docs to target with corresponding mapper method
|
# Map source docs to target with corresponding mapper method
|
||||||
|
|||||||
@@ -454,6 +454,7 @@
|
|||||||
{
|
{
|
||||||
"doctype": "Item Tax",
|
"doctype": "Item Tax",
|
||||||
"parentfield": "taxes",
|
"parentfield": "taxes",
|
||||||
|
"tax_category": "_Test Tax Category 1",
|
||||||
"item_tax_template": "_Test Item Tax Template 1"
|
"item_tax_template": "_Test Item Tax Template 1"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user