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