From 73edb12ab3a579794782ae63173517f1c01a20ba Mon Sep 17 00:00:00 2001 From: Rucha Mahabal Date: Thu, 30 Jul 2020 14:50:30 +0530 Subject: [PATCH] fix: msgprint for sample collection doc created on Lab Test creation --- erpnext/healthcare/doctype/lab_test/lab_test.py | 6 ++++-- .../lab_test_template/lab_test_template.json | 15 ++++++++++----- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/erpnext/healthcare/doctype/lab_test/lab_test.py b/erpnext/healthcare/doctype/lab_test/lab_test.py index c676dfb8a8..2bf4a3a7db 100644 --- a/erpnext/healthcare/doctype/lab_test/lab_test.py +++ b/erpnext/healthcare/doctype/lab_test/lab_test.py @@ -6,7 +6,7 @@ from __future__ import unicode_literals import frappe from frappe import _ from frappe.model.document import Document -from frappe.utils import getdate, cstr +from frappe.utils import getdate, cstr, get_link_to_form class LabTest(Document): def validate(self): @@ -262,7 +262,9 @@ def create_sample_collection(lab_test, template, patient, invoice): sample_collection = create_sample_doc(template, patient, invoice, lab_test.company) if sample_collection: lab_test.sample = sample_collection.name - + sample_collection_doc = get_link_to_form('Sample Collection', sample_collection.name) + frappe.msgprint(_('Sample Collection {0} has been created').format(sample_collection_doc), + title=_('Sample Collection'), indicator='green') return lab_test def load_result_format(lab_test, template, prescription, invoice): diff --git a/erpnext/healthcare/doctype/lab_test_template/lab_test_template.json b/erpnext/healthcare/doctype/lab_test_template/lab_test_template.json index fc6a1e1790..c3fc842047 100644 --- a/erpnext/healthcare/doctype/lab_test_template/lab_test_template.json +++ b/erpnext/healthcare/doctype/lab_test_template/lab_test_template.json @@ -34,14 +34,15 @@ "descriptive_test_templates", "section_break_group", "lab_test_groups", - "medical_coding_section", - "medical_code_standard", - "medical_code", "sb_sample_collection", "sample", "sample_uom", "sample_qty", + "column_break_33", "sample_details", + "medical_coding_section", + "medical_code", + "medical_code_standard", "worksheet_section", "worksheet_instructions", "result_legend_section", @@ -128,6 +129,7 @@ "mandatory_depends_on": "eval:doc.is_billable == 1" }, { + "collapsible": 1, "fieldname": "medical_coding_section", "fieldtype": "Section Break", "label": "Medical Coding" @@ -217,7 +219,6 @@ "no_copy": 1 }, { - "collapsible": 1, "fieldname": "sb_sample_collection", "fieldtype": "Section Break", "label": "Sample Collection" @@ -311,10 +312,14 @@ "fieldname": "descriptive_test_templates", "fieldtype": "Table", "options": "Descriptive Test Template" + }, + { + "fieldname": "column_break_33", + "fieldtype": "Column Break" } ], "links": [], - "modified": "2020-07-30 11:55:43.093828", + "modified": "2020-07-30 14:32:40.449818", "modified_by": "Administrator", "module": "Healthcare", "name": "Lab Test Template",