From 8c9249b629efc2320a16ff0d32015c457e9a7943 Mon Sep 17 00:00:00 2001 From: tunde Date: Tue, 27 Jun 2017 14:00:23 +0100 Subject: [PATCH] [minor] corrects docstring for `set_new_name` --- frappe/model/naming.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/frappe/model/naming.py b/frappe/model/naming.py index ef431adfda..3f0b1b7228 100644 --- a/frappe/model/naming.py +++ b/frappe/model/naming.py @@ -8,17 +8,16 @@ from frappe.utils import now_datetime, cint import re def set_new_name(doc): - """Sets the `name`` property for the document based on various rules. - - 1. If amened doc, set suffix. - 3. If `autoname` method is declared, then call it. - 4. If `autoname` property is set in the DocType (`meta`), then build it using the `autoname` property. - 2. If `name` is already defined, use that name - 5. If no rule defined, use hash. + """ + Sets the `name` property for the document based on various rules. - #### Note: + 1. If amended doc, set suffix. + 2. If `autoname` method is declared, then call it. + 3. If `autoname` property is set in the DocType (`meta`), then build it using the `autoname` property. + 4. If no rule defined, use hash. - :param doc: Document to be named.""" + :param doc: Document to be named. + """ doc.run_method("before_naming")