mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-13 02:01:21 +00:00
fix: On Specific case if no item code in name
This commit is contained in:
committed by
Nabin Hait
parent
0c0604b7ee
commit
28a7ce9a50
@@ -39,9 +39,11 @@ class BOM(WebsiteGenerator):
|
||||
names = [d[-1][1:] for d in filter(lambda x: len(x) > 1 and x[-1], names)]
|
||||
|
||||
# split by (-) if cancelled
|
||||
names = [cint(name.split('-')[-1]) for name in names]
|
||||
|
||||
idx = max(names) + 1
|
||||
if names:
|
||||
names = [cint(name.split('-')[-1]) for name in names]
|
||||
idx = max(names) + 1
|
||||
else:
|
||||
idx = 1
|
||||
else:
|
||||
idx = 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user