mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-13 20:05:09 +00:00
Co-authored-by: Pandiyan P <pandiyanpalani37@gmail.com> fix: handle NoneType error while creating a item (#53313)
This commit is contained in:
@@ -1536,7 +1536,7 @@ def parse_naming_series_variable(doc, variable):
|
||||
getdate(doc.get("posting_date") or doc.get("transaction_date") or doc.get("posting_datetime"))
|
||||
or now_datetime()
|
||||
)
|
||||
if frappe.get_single_value("Global Defaults", "use_posting_datetime_for_naming_documents")
|
||||
if doc and frappe.get_single_value("Global Defaults", "use_posting_datetime_for_naming_documents")
|
||||
else now_datetime()
|
||||
)
|
||||
return date.strftime(data[variable]) if variable in data else determine_consecutive_week_number(date)
|
||||
|
||||
Reference in New Issue
Block a user