fix: Rename Pick TIcket -> Pick List
diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js
index 6e6b730..136ff55 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.js
+++ b/erpnext/selling/doctype/sales_order/sales_order.js
@@ -110,7 +110,7 @@
let allow_delivery = false;
if (doc.docstatus==1) {
- this.frm.add_custom_button(__('Pick Ticket'), () => this.make_pick_ticket(), __('Create'));
+ this.frm.add_custom_button(__('Pick List'), () => this.make_pick_ticket(), __('Create'));
if(this.frm.has_perm("submit")) {
if(doc.status === 'On Hold') {
diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py
index 5e9a358..1d636e3 100755
--- a/erpnext/selling/doctype/sales_order/sales_order.py
+++ b/erpnext/selling/doctype/sales_order/sales_order.py
@@ -1001,13 +1001,13 @@
def make_pick_ticket(source_name, target_doc=None):
doc = get_mapped_doc("Sales Order", source_name, {
"Sales Order": {
- "doctype": "Pick Ticket",
+ "doctype": "Pick List",
"validation": {
"docstatus": ["=", 1]
}
},
"Sales Order Item": {
- "doctype": "Pick Ticket Reference Item",
+ "doctype": "Pick List Reference Item",
"field_map": {
"item_code": "item",
"parenttype": "reference_doctype",
diff --git a/erpnext/stock/doctype/pick_ticket/__init__.py b/erpnext/stock/doctype/pick_list/__init__.py
similarity index 100%
rename from erpnext/stock/doctype/pick_ticket/__init__.py
rename to erpnext/stock/doctype/pick_list/__init__.py
diff --git a/erpnext/stock/doctype/pick_ticket/pick_ticket.js b/erpnext/stock/doctype/pick_list/pick_list.js
similarity index 88%
rename from erpnext/stock/doctype/pick_ticket/pick_ticket.js
rename to erpnext/stock/doctype/pick_list/pick_list.js
index 5e5881e..4cf4cdf 100644
--- a/erpnext/stock/doctype/pick_ticket/pick_ticket.js
+++ b/erpnext/stock/doctype/pick_list/pick_list.js
@@ -1,7 +1,7 @@
// Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
-frappe.ui.form.on('Pick Ticket', {
+frappe.ui.form.on('Pick List', {
setup: (frm) => {
frm.set_query('parent_warehouse', () => {
return {
@@ -16,7 +16,7 @@
frm.add_custom_button(__('Delivery Note'), () => frm.trigger('make_delivery_note'), __('Create'));
frm.add_custom_button(__('Sales Order'), function() {
erpnext.utils.map_current_doc({
- method: "erpnext.selling.doctype.sales_order.sales_order.make_pick_ticket",
+ method: "erpnext.selling.doctype.sales_order.sales_order.make_pick_list",
source_doctype: "Sales Order",
target: frm,
setters: {
@@ -36,7 +36,7 @@
},
make_delivery_note(frm) {
frappe.model.open_mapped_doc({
- method: "erpnext.stock.doctype.pick_ticket.pick_ticket.make_delivery_note",
+ method: "erpnext.stock.doctype.pick_list.pick_list.make_delivery_note",
frm: frm
});
},
diff --git a/erpnext/stock/doctype/pick_ticket/pick_ticket.json b/erpnext/stock/doctype/pick_list/pick_list.json
similarity index 92%
rename from erpnext/stock/doctype/pick_ticket/pick_ticket.json
rename to erpnext/stock/doctype/pick_list/pick_list.json
index d8a8e01..3f96630 100644
--- a/erpnext/stock/doctype/pick_ticket/pick_ticket.json
+++ b/erpnext/stock/doctype/pick_list/pick_list.json
@@ -43,19 +43,19 @@
"fieldname": "item_locations",
"fieldtype": "Table",
"label": "Item Locations",
- "options": "Pick Ticket Item"
+ "options": "Pick List Item"
},
{
"fieldname": "reference_items",
"fieldtype": "Table",
"label": "Items To Be Picked",
- "options": "Pick Ticket Reference Item"
+ "options": "Pick List Reference Item"
}
],
"modified": "2019-08-01 10:50:17.055509",
"modified_by": "Administrator",
"module": "Stock",
- "name": "Pick Ticket",
+ "name": "Pick List",
"owner": "Administrator",
"permissions": [
{
diff --git a/erpnext/stock/doctype/pick_ticket/pick_ticket.py b/erpnext/stock/doctype/pick_list/pick_list.py
similarity index 96%
rename from erpnext/stock/doctype/pick_ticket/pick_ticket.py
rename to erpnext/stock/doctype/pick_list/pick_list.py
index 16f6d7a..3e45bdd 100644
--- a/erpnext/stock/doctype/pick_ticket/pick_ticket.py
+++ b/erpnext/stock/doctype/pick_list/pick_list.py
@@ -7,7 +7,7 @@
from frappe.model.document import Document
from frappe.model.mapper import get_mapped_doc
-class PickTicket(Document):
+class PickList(Document):
def set_item_locations(self):
reference_items = self.reference_items
@@ -131,14 +131,14 @@
@frappe.whitelist()
def make_delivery_note(source_name, target_doc=None):
- target_doc = get_mapped_doc("Pick Ticket", source_name, {
- "Pick Ticket": {
+ target_doc = get_mapped_doc("Pick List", source_name, {
+ "Pick List": {
"doctype": "Delivery Note",
# "validation": {
# "docstatus": ["=", 1]
# }
},
- "Pick Ticket Item": {
+ "Pick List Item": {
"doctype": "Delivery Note Item",
"field_map": {
"item": "item_code",
diff --git a/erpnext/stock/doctype/pick_list/test_pick_list.py b/erpnext/stock/doctype/pick_list/test_pick_list.py
new file mode 100644
index 0000000..ed4b6b5
--- /dev/null
+++ b/erpnext/stock/doctype/pick_list/test_pick_list.py
@@ -0,0 +1,100 @@
+# -*- coding: utf-8 -*-
+# Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors
+# See license.txt
+from __future__ import unicode_literals
+
+import frappe
+import unittest
+# test_dependencies = ['Item', 'Sales Invoice', 'Stock Entry', 'Batch']
+
+from erpnext.selling.doctype.sales_order.sales_order import make_pick_list
+
+class TestPickList(unittest.TestCase):
+ def test_pick_list_picks_warehouse_for_each_item(self):
+ pick_list = frappe.get_doc({
+ 'doctype': 'Pick List',
+ 'company': '_Test Company',
+ 'reference_items': [{
+ 'item': '_Test Item Home Desktop 100',
+ 'reference_doctype': 'Sales Order',
+ 'qty': 5,
+ 'reference_name': '_T-Sales Order-1',
+ }],
+ })
+
+ pick_list.set_item_locations()
+
+ self.assertEqual(pick_list.items_locations[0].item, '_Test Item Home Desktop 100')
+ self.assertEqual(pick_list.items_locations[0].warehouse, '_Test Warehouse - _TC')
+ self.assertEqual(pick_list.items_locations[0].qty, 5)
+
+ def test_pick_list_skips_out_of_stock_item(self):
+ pick_list = frappe.get_doc({
+ 'doctype': 'Pick List',
+ 'company': '_Test Company',
+ 'reference_items': [{
+ 'item': '_Test Item Warehouse Group Wise Reorder',
+ 'reference_doctype': 'Sales Order',
+ 'qty': 1000,
+ 'reference_name': '_T-Sales Order-1',
+ }],
+ })
+
+ pick_list.set_item_locations()
+
+ self.assertEqual(pick_list.items_locations[0].item, '_Test Item Warehouse Group Wise Reorder')
+ self.assertEqual(pick_list.items_locations[0].warehouse, '_Test Warehouse Group-C1 - _TC')
+ self.assertEqual(pick_list.items_locations[0].qty, 30)
+
+
+ def test_pick_list_skips_items_in_expired_batch(self):
+ pass
+
+ def test_pick_list_shows_serial_no_for_serialized_item(self):
+
+ stock_reconciliation = frappe.get_doc({
+ 'doctype': 'Stock Reconciliation',
+ 'company': '_Test Company',
+ 'items': [{
+ 'item_code': '_Test Serialized Item',
+ 'warehouse': '_Test Warehouse - _TC',
+ 'qty': 5,
+ 'serial_no': '123450\n123451\n123452\n123453\n123454'
+ }]
+ })
+
+ stock_reconciliation.submit()
+
+ pick_list = frappe.get_doc({
+ 'doctype': 'Pick List',
+ 'company': '_Test Company',
+ 'reference_items': [{
+ 'item': '_Test Serialized Item',
+ 'reference_doctype': 'Sales Order',
+ 'qty': 1000,
+ 'reference_name': '_T-Sales Order-1',
+ }],
+ })
+
+ pick_list.set_item_locations()
+ self.assertEqual(pick_list.items_locations[0].item, '_Test Serialized Item')
+ self.assertEqual(pick_list.items_locations[0].warehouse, '_Test Warehouse Group-C1 - _TC')
+ self.assertEqual(pick_list.items_locations[0].qty, 30)
+ self.assertEqual(pick_list.items_locations[0].serial_no, 30)
+
+
+ def test_pick_list_for_multiple_reference_doctypes(self):
+ pass
+
+
+## records required
+
+'''
+batch no
+items
+sales invoice
+stock entries
+ bin
+ stock ledger entry
+warehouses
+'''
\ No newline at end of file
diff --git a/erpnext/stock/doctype/pick_ticket_item/__init__.py b/erpnext/stock/doctype/pick_list_item/pick_list_item/__init__.py
similarity index 100%
copy from erpnext/stock/doctype/pick_ticket_item/__init__.py
copy to erpnext/stock/doctype/pick_list_item/pick_list_item/__init__.py
diff --git a/erpnext/stock/doctype/pick_ticket_item/pick_ticket_item.json b/erpnext/stock/doctype/pick_list_item/pick_list_item/pick_ticket_item.json
similarity index 98%
rename from erpnext/stock/doctype/pick_ticket_item/pick_ticket_item.json
rename to erpnext/stock/doctype/pick_list_item/pick_list_item/pick_ticket_item.json
index 67a7e9c..c83b696 100644
--- a/erpnext/stock/doctype/pick_ticket_item/pick_ticket_item.json
+++ b/erpnext/stock/doctype/pick_list_item/pick_list_item/pick_ticket_item.json
@@ -132,7 +132,7 @@
"modified": "2019-07-30 23:47:53.566473",
"modified_by": "Administrator",
"module": "Stock",
- "name": "Pick Ticket Item",
+ "name": "Pick List Item",
"owner": "Administrator",
"permissions": [],
"quick_entry": 1,
diff --git a/erpnext/stock/doctype/pick_ticket_item/pick_ticket_item.py b/erpnext/stock/doctype/pick_list_item/pick_list_item/pick_ticket_item.py
similarity index 88%
rename from erpnext/stock/doctype/pick_ticket_item/pick_ticket_item.py
rename to erpnext/stock/doctype/pick_list_item/pick_list_item/pick_ticket_item.py
index a13666a..8797b8d 100644
--- a/erpnext/stock/doctype/pick_ticket_item/pick_ticket_item.py
+++ b/erpnext/stock/doctype/pick_list_item/pick_list_item/pick_ticket_item.py
@@ -6,5 +6,5 @@
# import frappe
from frappe.model.document import Document
-class PickTicketItem(Document):
+class PickListItem(Document):
pass
diff --git a/erpnext/stock/doctype/pick_ticket_item/__init__.py b/erpnext/stock/doctype/pick_list_reference_item/__init__.py
similarity index 100%
rename from erpnext/stock/doctype/pick_ticket_item/__init__.py
rename to erpnext/stock/doctype/pick_list_reference_item/__init__.py
diff --git a/erpnext/stock/doctype/pick_ticket_reference_item/pick_ticket_reference_item.js b/erpnext/stock/doctype/pick_list_reference_item/pick_list_reference_item.js
similarity index 76%
rename from erpnext/stock/doctype/pick_ticket_reference_item/pick_ticket_reference_item.js
rename to erpnext/stock/doctype/pick_list_reference_item/pick_list_reference_item.js
index a3f9096..875ce23 100644
--- a/erpnext/stock/doctype/pick_ticket_reference_item/pick_ticket_reference_item.js
+++ b/erpnext/stock/doctype/pick_list_reference_item/pick_list_reference_item.js
@@ -1,7 +1,7 @@
// Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt
-frappe.ui.form.on('Pick Ticket Reference Item', {
+frappe.ui.form.on('Pick List Reference Item', {
// refresh: function(frm) {
// }
diff --git a/erpnext/stock/doctype/pick_ticket_reference_item/pick_ticket_reference_item.json b/erpnext/stock/doctype/pick_list_reference_item/pick_list_reference_item.json
similarity index 95%
rename from erpnext/stock/doctype/pick_ticket_reference_item/pick_ticket_reference_item.json
rename to erpnext/stock/doctype/pick_list_reference_item/pick_list_reference_item.json
index c31e2bc..23ef255 100644
--- a/erpnext/stock/doctype/pick_ticket_reference_item/pick_ticket_reference_item.json
+++ b/erpnext/stock/doctype/pick_list_reference_item/pick_list_reference_item.json
@@ -46,7 +46,7 @@
"modified": "2019-07-30 23:43:30.901151",
"modified_by": "Administrator",
"module": "Stock",
- "name": "Pick Ticket Reference Item",
+ "name": "Pick List Reference Item",
"owner": "Administrator",
"permissions": [],
"sort_field": "modified",
diff --git a/erpnext/stock/doctype/pick_ticket_item/pick_ticket_item.py b/erpnext/stock/doctype/pick_list_reference_item/pick_list_reference_item.py
similarity index 85%
copy from erpnext/stock/doctype/pick_ticket_item/pick_ticket_item.py
copy to erpnext/stock/doctype/pick_list_reference_item/pick_list_reference_item.py
index a13666a..74f0563 100644
--- a/erpnext/stock/doctype/pick_ticket_item/pick_ticket_item.py
+++ b/erpnext/stock/doctype/pick_list_reference_item/pick_list_reference_item.py
@@ -6,5 +6,5 @@
# import frappe
from frappe.model.document import Document
-class PickTicketItem(Document):
+class PickListReferenceItem(Document):
pass
diff --git a/erpnext/stock/doctype/pick_ticket/test_pick_ticket.py b/erpnext/stock/doctype/pick_ticket/test_pick_ticket.py
deleted file mode 100644
index 5a41bc9..0000000
--- a/erpnext/stock/doctype/pick_ticket/test_pick_ticket.py
+++ /dev/null
@@ -1,100 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and Contributors
-# See license.txt
-from __future__ import unicode_literals
-
-import frappe
-import unittest
-# test_dependencies = ['Item', 'Sales Invoice', 'Stock Entry', 'Batch']
-
-from erpnext.selling.doctype.sales_order.sales_order import make_pick_ticket
-
-class TestPickTicket(unittest.TestCase):
- def test_pick_ticket_picks_warehouse_for_each_item(self):
- pick_ticket = frappe.get_doc({
- 'doctype': 'Pick Ticket',
- 'company': '_Test Company',
- 'reference_items': [{
- 'item': '_Test Item Home Desktop 100',
- 'reference_doctype': 'Sales Order',
- 'qty': 5,
- 'reference_name': '_T-Sales Order-1',
- }],
- })
-
- pick_ticket.set_item_locations()
-
- self.assertEqual(pick_ticket.items_locations[0].item, '_Test Item Home Desktop 100')
- self.assertEqual(pick_ticket.items_locations[0].warehouse, '_Test Warehouse - _TC')
- self.assertEqual(pick_ticket.items_locations[0].qty, 5)
-
- def test_pick_ticket_skips_out_of_stock_item(self):
- pick_ticket = frappe.get_doc({
- 'doctype': 'Pick Ticket',
- 'company': '_Test Company',
- 'reference_items': [{
- 'item': '_Test Item Warehouse Group Wise Reorder',
- 'reference_doctype': 'Sales Order',
- 'qty': 1000,
- 'reference_name': '_T-Sales Order-1',
- }],
- })
-
- pick_ticket.set_item_locations()
-
- self.assertEqual(pick_ticket.items_locations[0].item, '_Test Item Warehouse Group Wise Reorder')
- self.assertEqual(pick_ticket.items_locations[0].warehouse, '_Test Warehouse Group-C1 - _TC')
- self.assertEqual(pick_ticket.items_locations[0].qty, 30)
-
-
- def test_pick_ticket_skips_items_in_expired_batch(self):
- pass
-
- def test_pick_ticket_shows_serial_no_for_serialized_item(self):
-
- stock_reconciliation = frappe.get_doc({
- 'doctype': 'Stock Reconciliation',
- 'company': '_Test Company',
- 'items': [{
- 'item_code': '_Test Serialized Item',
- 'warehouse': '_Test Warehouse - _TC',
- 'qty': 5,
- 'serial_no': '123450\n123451\n123452\n123453\n123454'
- }]
- })
-
- stock_reconciliation.submit()
-
- pick_ticket = frappe.get_doc({
- 'doctype': 'Pick Ticket',
- 'company': '_Test Company',
- 'reference_items': [{
- 'item': '_Test Serialized Item',
- 'reference_doctype': 'Sales Order',
- 'qty': 1000,
- 'reference_name': '_T-Sales Order-1',
- }],
- })
-
- pick_ticket.set_item_locations()
- self.assertEqual(pick_ticket.items_locations[0].item, '_Test Serialized Item')
- self.assertEqual(pick_ticket.items_locations[0].warehouse, '_Test Warehouse Group-C1 - _TC')
- self.assertEqual(pick_ticket.items_locations[0].qty, 30)
- self.assertEqual(pick_ticket.items_locations[0].serial_no, 30)
-
-
- def test_pick_ticket_for_multiple_reference_doctypes(self):
- pass
-
-
-## records required
-
-'''
-batch no
-items
-sales invoice
-stock entries
- bin
- stock ledger entry
-warehouses
-'''
\ No newline at end of file
diff --git a/erpnext/stock/doctype/pick_ticket_reference_item/pick_ticket_reference_item.py b/erpnext/stock/doctype/pick_ticket_reference_item/pick_ticket_reference_item.py
deleted file mode 100644
index 412be75..0000000
--- a/erpnext/stock/doctype/pick_ticket_reference_item/pick_ticket_reference_item.py
+++ /dev/null
@@ -1,10 +0,0 @@
-# -*- coding: utf-8 -*-
-# Copyright (c) 2019, Frappe Technologies Pvt. Ltd. and contributors
-# For license information, please see license.txt
-
-from __future__ import unicode_literals
-# import frappe
-from frappe.model.document import Document
-
-class PickTicketReferenceItem(Document):
- pass