You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because Budget is using Cost Center or Project name when creating its auto naming, so if special characters exist in Cost Center's name ( let's say 'P & L Company Cost Center' ), it will cause error in saving new Budget. But special character is allowed in Cost Center naming. Below is the code that causing issue.
Frappe Version - v14.8.0
ERPNext Version - v14.2.0
Installation method
FrappeCloud
Relevant log output / Stack trace / Full Error Message.
Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 69, in application
response = frappe.api.handle()
File "apps/frappe/frappe/api.py", line 54, in handle
returnfrappe.handler.handle()
File "apps/frappe/frappe/handler.py", line 45, in handle
data = execute_cmd(cmd)
File "apps/frappe/frappe/handler.py", line 83, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "apps/frappe/frappe/__init__.py", line 1598, in call
return fn(*args, **newargs)
File "apps/frappe/frappe/desk/form/save.py", line 22, in savedocs
doc.save()
File "apps/frappe/frappe/model/document.py", line 301, in save
return self._save(*args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 323, in _save
returnself.insert()
File "apps/frappe/frappe/model/document.py", line 250, in insert
self.set_new_name(set_name=set_name, set_child_names=set_child_names)
File "apps/frappe/frappe/model/document.py", line 446, in set_new_name
set_new_name(self)
File "apps/frappe/frappe/model/naming.py", line 163, in set_new_name
doc.run_method("autoname")
File "apps/frappe/frappe/model/document.py", line 928, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1268, in composer
return composed(self, method, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1250, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "apps/frappe/frappe/model/document.py", line 925, in fn
return method_object(*args, **kwargs)
File "apps/erpnext/erpnext/accounts/doctype/budget/budget.py", line 27, in autoname
self.name = make_autoname(
File "apps/frappe/frappe/model/naming.py", line 285, in make_autoname
return series.generate_next_name(doc)
File "apps/frappe/frappe/model/naming.py", line 68, in generate_next_name
self.validate()
File "apps/frappe/frappe/model/naming.py", line 60, in validate
frappe.throw(
File "apps/frappe/frappe/__init__.py", line 523, in throw
msgprint(
File "apps/frappe/frappe/__init__.py", line 491, in msgprint
_raise_exception()
File "apps/frappe/frappe/__init__.py", line 443, in _raise_exception
raise raise_exception(msg)
frappe.model.naming.InvalidNamingSeriesError: Special Characters except "-", "#", ".", "/", "{" and "}" not allowed in naming series
The text was updated successfully, but these errors were encountered:
@anandbaburajan they can. Naming series validation only applies on template and not field values. Here the code is passing field values already substituted in the template.
Information about bug
Because Budget is using Cost Center or Project name when creating its auto naming, so if special characters exist in Cost Center's name ( let's say 'P & L Company Cost Center' ), it will cause error in saving new Budget. But special character is allowed in Cost Center naming. Below is the code that causing issue.
erpnext/accounts/doctype/budget/budget.py
Module
accounts
Version
Frappe Version - v14.8.0
ERPNext Version - v14.2.0
Installation method
FrappeCloud
Relevant log output / Stack trace / Full Error Message.
The text was updated successfully, but these errors were encountered: