mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-04 22:18:27 +00:00
added some test records
This commit is contained in:
@@ -19,4 +19,11 @@ import webnotes
|
||||
|
||||
class DocType:
|
||||
def __init__(self, d, dl):
|
||||
self.doc, self.doclist = d, dl
|
||||
self.doc, self.doclist = d, dl
|
||||
|
||||
test_records = [
|
||||
[{
|
||||
"doctype": "Brand",
|
||||
"brand": "_Test Brand"
|
||||
}]
|
||||
]
|
||||
@@ -258,9 +258,9 @@ class DocType:
|
||||
|
||||
test_records = [
|
||||
[{
|
||||
"doctype": "Company",
|
||||
"company_name": "_Test Company",
|
||||
"abbr": "TC",
|
||||
"abbr": "_TC",
|
||||
"default_currency": "INR",
|
||||
"doctype": "Company"
|
||||
}]
|
||||
}],
|
||||
]
|
||||
@@ -19,4 +19,11 @@ import webnotes
|
||||
|
||||
class DocType:
|
||||
def __init__(self, d, dl):
|
||||
self.doc, self.doclist = d, dl
|
||||
self.doc, self.doclist = d, dl
|
||||
|
||||
test_records = [
|
||||
[{
|
||||
"doctype": "Country",
|
||||
"country_name": "_Test Country"
|
||||
}]
|
||||
]
|
||||
@@ -20,5 +20,3 @@ import webnotes
|
||||
class DocType:
|
||||
def __init__(self, d, dl):
|
||||
self.doc, self.doclist = d, dl
|
||||
|
||||
test_records = []
|
||||
@@ -16,9 +16,6 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import webnotes
|
||||
|
||||
from webnotes.model import db_exists
|
||||
from webnotes.model.wrapper import copy_doclist
|
||||
from webnotes import msgprint
|
||||
|
||||
sql = webnotes.conn.sql
|
||||
@@ -63,4 +60,13 @@ class DocType(DocTypeNestedSet):
|
||||
You can not trash/cancel/delete this customer group.", raise_exception=1)
|
||||
|
||||
# rebuild tree
|
||||
super(DocType, self).on_trash()
|
||||
super(DocType, self).on_trash()
|
||||
|
||||
test_records = [
|
||||
[{
|
||||
"doctype": "Customer Group",
|
||||
"customer_group_name": "_Test Customer Group",
|
||||
"parent_customer_group": "All Customer Groups",
|
||||
"is_group": "No"
|
||||
}]
|
||||
]
|
||||
@@ -67,4 +67,19 @@ class DocType(DocTypeNestedSet):
|
||||
|
||||
if self.doc.slideshow:
|
||||
from website.helpers.slideshow import get_slideshow
|
||||
get_slideshow(self)
|
||||
get_slideshow(self)
|
||||
|
||||
test_records = [
|
||||
[{
|
||||
"doctype": "Item Group",
|
||||
"item_group_name": "_Test Item Group",
|
||||
"parent_item_group": "All Item Groups",
|
||||
"is_group": "No"
|
||||
}],
|
||||
[{
|
||||
"doctype": "Item Group",
|
||||
"item_group_name": "_Test Item Group Desktops",
|
||||
"parent_item_group": "All Item Groups",
|
||||
"is_group": "No"
|
||||
}],
|
||||
]
|
||||
@@ -32,4 +32,13 @@ class DocType(DocTypeNestedSet):
|
||||
for d in getlist(self.doclist, 'target_details'):
|
||||
if not flt(d.target_qty) and not flt(d.target_amount):
|
||||
msgprint("Either target qty or target amount is mandatory.")
|
||||
raise Exception
|
||||
raise Exception
|
||||
|
||||
test_records = [
|
||||
[{
|
||||
"doctype": "Territory",
|
||||
"territory_name": "_Test Territory",
|
||||
"parent_territory": "All Territories",
|
||||
"is_group": "No",
|
||||
}]
|
||||
]
|
||||
@@ -19,4 +19,11 @@ import webnotes
|
||||
|
||||
class DocType:
|
||||
def __init__(self, d, dl):
|
||||
self.doc, self.doclist = d, dl
|
||||
self.doc, self.doclist = d, dl
|
||||
|
||||
test_records = [
|
||||
[{
|
||||
"doctype": "UOM",
|
||||
"uom_name": "_Test UOM"
|
||||
}]
|
||||
]
|
||||
@@ -19,4 +19,11 @@ import webnotes
|
||||
|
||||
class DocType:
|
||||
def __init__(self, d, dl):
|
||||
self.doc, self.doclist = d, dl
|
||||
self.doc, self.doclist = d, dl
|
||||
|
||||
test_records = [
|
||||
[{
|
||||
"doctype": "Warehouse Type",
|
||||
"warehouse_type": "_Test Warehouse Type"
|
||||
}]
|
||||
]
|
||||
Reference in New Issue
Block a user