From d43764c8e595d86376131333235177043d434a3c Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Sun, 28 Jul 2019 22:03:28 +0530 Subject: [PATCH] fix: Use .set method to set serial no. --- erpnext/stock/doctype/pick_ticket/pick_ticket.py | 2 +- erpnext/stock/doctype/pick_ticket_item/pick_ticket_item.json | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/erpnext/stock/doctype/pick_ticket/pick_ticket.py b/erpnext/stock/doctype/pick_ticket/pick_ticket.py index eb54730616..18382e6781 100644 --- a/erpnext/stock/doctype/pick_ticket/pick_ticket.py +++ b/erpnext/stock/doctype/pick_ticket/pick_ticket.py @@ -61,7 +61,7 @@ def set_serial_nos(item): 'item_code': item.item, 'warehouse': item.warehouse }, limit=item.qty, order_by='purchase_date') - item.serial_no = '\n'.join([serial_no.name for serial_no in serial_nos]) + item.set('serial_no', '\n'.join([serial_no.name for serial_no in serial_nos])) def set_batch_no(item, doc): batches = frappe.get_all('Stock Ledger Entry', diff --git a/erpnext/stock/doctype/pick_ticket_item/pick_ticket_item.json b/erpnext/stock/doctype/pick_ticket_item/pick_ticket_item.json index 6db32845e7..7095be68f0 100644 --- a/erpnext/stock/doctype/pick_ticket_item/pick_ticket_item.json +++ b/erpnext/stock/doctype/pick_ticket_item/pick_ticket_item.json @@ -72,7 +72,6 @@ "read_only": 1 }, { - "depends_on": "has_serial_no", "fieldname": "serial_no", "fieldtype": "Small Text", "label": "Serial No", @@ -130,7 +129,7 @@ } ], "istable": 1, - "modified": "2019-07-25 11:18:58.478250", + "modified": "2019-07-26 14:47:33.965373", "modified_by": "Administrator", "module": "Stock", "name": "Pick Ticket Item",