mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-06 21:59:13 +00:00
Batch naming series hotfix (#17483)
* fix: not able to make sales order from quotation * fix: batch naming series unicode() call is py3 incompatible
This commit is contained in:
committed by
Nabin Hait
parent
53d7e667dd
commit
8fcad571f5
@@ -9,6 +9,7 @@ from frappe.model.naming import make_autoname, revert_series_if_last
|
|||||||
from frappe.utils import flt, cint
|
from frappe.utils import flt, cint
|
||||||
from frappe.utils.jinja import render_template
|
from frappe.utils.jinja import render_template
|
||||||
from frappe.utils.data import add_days
|
from frappe.utils.data import add_days
|
||||||
|
from six import string_types
|
||||||
|
|
||||||
class UnableToSelectBatchError(frappe.ValidationError):
|
class UnableToSelectBatchError(frappe.ValidationError):
|
||||||
pass
|
pass
|
||||||
@@ -60,7 +61,7 @@ def _make_naming_series_key(prefix):
|
|||||||
:param prefix: Naming series prefix gotten from Stock Settings
|
:param prefix: Naming series prefix gotten from Stock Settings
|
||||||
:return: The derived key. If no prefix is given, an empty string is returned
|
:return: The derived key. If no prefix is given, an empty string is returned
|
||||||
"""
|
"""
|
||||||
if not unicode(prefix):
|
if not isinstance(prefix, string_types):
|
||||||
return ''
|
return ''
|
||||||
else:
|
else:
|
||||||
return prefix.upper() + '.#####'
|
return prefix.upper() + '.#####'
|
||||||
|
|||||||
Reference in New Issue
Block a user