Merge pull request #2497 from neilLasrado/batch-redesign
batch redesigned
diff --git a/erpnext/stock/doctype/batch/batch.js b/erpnext/stock/doctype/batch/batch.js
index cc142ed..18e52b4 100644
--- a/erpnext/stock/doctype/batch/batch.js
+++ b/erpnext/stock/doctype/batch/batch.js
@@ -5,7 +5,8 @@
return {
query: "erpnext.controllers.queries.item_query",
filters:{
- 'is_stock_item': 'Yes'
+ 'is_stock_item': 'Yes',
+ 'has_batch_no': 'Yes'
}
}
-}
\ No newline at end of file
+}
diff --git a/erpnext/stock/doctype/batch/batch.json b/erpnext/stock/doctype/batch/batch.json
index 5edf292..c586725 100644
--- a/erpnext/stock/doctype/batch/batch.json
+++ b/erpnext/stock/doctype/batch/batch.json
@@ -1,7 +1,7 @@
{
- "allow_import": 1,
+ "allow_import": 1,
"autoname": "field:batch_id",
- "creation": "2013-03-05 14:50:38.000000",
+ "creation": "2013-03-05 14:50:38",
"docstatus": 0,
"doctype": "DocType",
"document_type": "Master",
@@ -28,23 +28,10 @@
"reqd": 1
},
{
- "fieldname": "description",
- "fieldtype": "Small Text",
- "in_list_view": 1,
- "label": "Description",
- "oldfieldname": "description",
- "oldfieldtype": "Small Text",
+ "fieldname": "column_break_3",
+ "fieldtype": "Column Break",
"permlevel": 0,
- "width": "300px"
- },
- {
- "fieldname": "expiry_date",
- "fieldtype": "Date",
- "in_list_view": 1,
- "label": "Expiry Date",
- "oldfieldname": "expiry_date",
- "oldfieldtype": "Date",
- "permlevel": 0
+ "precision": ""
},
{
"fieldname": "start_date",
@@ -61,12 +48,37 @@
"oldfieldname": "finished_date",
"oldfieldtype": "Date",
"permlevel": 0
+ },
+ {
+ "fieldname": "expiry_date",
+ "fieldtype": "Date",
+ "in_list_view": 1,
+ "label": "Expiry Date",
+ "oldfieldname": "expiry_date",
+ "oldfieldtype": "Date",
+ "permlevel": 0
+ },
+ {
+ "fieldname": "section_break_7",
+ "fieldtype": "Section Break",
+ "permlevel": 0,
+ "precision": ""
+ },
+ {
+ "fieldname": "description",
+ "fieldtype": "Small Text",
+ "in_list_view": 1,
+ "label": "Batch Description",
+ "oldfieldname": "description",
+ "oldfieldtype": "Small Text",
+ "permlevel": 0,
+ "width": "300px"
}
],
"icon": "icon-archive",
"idx": 1,
"max_attachments": 5,
- "modified": "2014-01-20 17:48:24.000000",
+ "modified": "2014-12-15 17:37:01.781726",
"modified_by": "Administrator",
"module": "Stock",
"name": "Batch",
diff --git a/erpnext/stock/doctype/batch/batch.py b/erpnext/stock/doctype/batch/batch.py
index 8b6aed7..5b6f799 100644
--- a/erpnext/stock/doctype/batch/batch.py
+++ b/erpnext/stock/doctype/batch/batch.py
@@ -12,6 +12,5 @@
self.item_has_batch_enabled()
def item_has_batch_enabled(self):
- has_batch_no = frappe.db.get_value("Item",self.item,"has_batch_no")
- if has_batch_no =='No':
- frappe.throw(_("The selected item cannot have Batch"))
\ No newline at end of file
+ if frappe.db.get_value("Item",self.item,"has_batch_no") =='No':
+ frappe.throw(_("The selected item cannot have Batch"))
diff --git a/erpnext/stock/doctype/batch/test_records.json b/erpnext/stock/doctype/batch/test_records.json
new file mode 100644
index 0000000..172cdee
--- /dev/null
+++ b/erpnext/stock/doctype/batch/test_records.json
@@ -0,0 +1,6 @@
+[
+ {
+ "doctype": "Batch",
+ "name": "_Test Batch 1"
+ }
+]