Fixes allowd on submit
This commit is contained in:
parent
5123a8519b
commit
2704162f5a
@ -1422,7 +1422,7 @@
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 1,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
@ -1939,7 +1939,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-04-17 13:44:17.460674",
|
||||
"modified": "2017-04-19 11:54:16.112134",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Purchase Invoice Item",
|
||||
|
@ -1548,7 +1548,7 @@
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 1,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
@ -2094,7 +2094,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-04-05 23:28:13.520429",
|
||||
"modified": "2017-04-19 11:53:26.682964",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Accounts",
|
||||
"name": "Sales Invoice Item",
|
||||
|
@ -54,25 +54,30 @@ class TestCustomer(unittest.TestCase):
|
||||
self.assertEquals(value, details.get(key))
|
||||
|
||||
def test_rename(self):
|
||||
# delete communication linked to these 2 customers
|
||||
for name in ("_Test Customer 1", "_Test Customer 1 Renamed"):
|
||||
frappe.db.sql("""delete from `tabCommunication`
|
||||
where communication_type='Comment' and reference_doctype=%s and reference_name=%s""",
|
||||
("Customer", name))
|
||||
|
||||
# add comments
|
||||
comment = frappe.get_doc("Customer", "_Test Customer 1").add_comment("Comment", "Test Comment for Rename")
|
||||
|
||||
# rename
|
||||
frappe.rename_doc("Customer", "_Test Customer 1", "_Test Customer 1 Renamed")
|
||||
|
||||
# check if customer renamed
|
||||
self.assertTrue(frappe.db.exists("Customer", "_Test Customer 1 Renamed"))
|
||||
self.assertFalse(frappe.db.exists("Customer", "_Test Customer 1"))
|
||||
|
||||
# test that comment gets renamed
|
||||
# test that comment gets linked to renamed doc
|
||||
self.assertEquals(frappe.db.get_value("Communication", {
|
||||
"communication_type": "Comment",
|
||||
"reference_doctype": "Customer",
|
||||
"reference_name": "_Test Customer 1 Renamed"
|
||||
}), comment.name)
|
||||
|
||||
# rename back to original
|
||||
frappe.rename_doc("Customer", "_Test Customer 1 Renamed", "_Test Customer 1")
|
||||
|
||||
def test_freezed_customer(self):
|
||||
|
@ -1644,7 +1644,7 @@
|
||||
"width": "120px"
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 1,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
@ -1894,7 +1894,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-04-05 23:26:03.390869",
|
||||
"modified": "2017-04-19 11:53:42.656700",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Delivery Note Item",
|
||||
|
@ -1630,7 +1630,7 @@
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 1,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
@ -1979,7 +1979,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-04-05 23:27:10.785444",
|
||||
"modified": "2017-04-19 11:54:00.260885",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Purchase Receipt Item",
|
||||
|
@ -1040,7 +1040,7 @@
|
||||
"unique": 0
|
||||
},
|
||||
{
|
||||
"allow_on_submit": 1,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"columns": 0,
|
||||
@ -1225,7 +1225,7 @@
|
||||
"issingle": 0,
|
||||
"istable": 1,
|
||||
"max_attachments": 0,
|
||||
"modified": "2017-04-05 23:25:26.885642",
|
||||
"modified": "2017-04-19 11:54:31.645381",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Stock",
|
||||
"name": "Stock Entry Detail",
|
||||
|
Loading…
x
Reference in New Issue
Block a user