Version 6.x.x Source

frappe.model.naming._set_amended_name (doc)

No docs


frappe.model.naming.append_number_if_name_exists (doc)

No docs


frappe.model.naming.de_duplicate (doctype, name)

No docs


frappe.model.naming.get_default_naming_series (doctype)

get default value for naming_series property


frappe.model.naming.getseries (key, digits, doctype=)

No docs


frappe.model.naming.make_autoname (key, doctype=)

Creates an autoname from the given key:

Autoname rules:

  * The key is separated by '.'
  * '####' represents a series. The string before this part becomes the prefix:
     Example: ABC.#### creates a series ABC0001, ABC0002 etc
  * 'MM' represents the current month
  * 'YY' and 'YYYY' represent the current year

Example:

  * DE/./.YY./.MM./.##### will create a series like
    DE/09/01/0001 where 09 is the year, 01 is the month and 0001 is the series

frappe.model.naming.revert_series_if_last (key, name)

No docs


frappe.model.naming.set_name_by_naming_series (doc)

Sets name by the naming_series property


frappe.model.naming.set_new_name (doc)

Sets the `name`` property for the document based on various rules.

  1. If amened 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 name is already defined, use that name
  5. If no rule defined, use hash.

Note:

Parameters:


frappe.model.naming.validate_name (doctype, name, case=None, merge=False)

No docs