Inherits from __builtin__.object
No docs
_extract_images_from_text_editor (self)
No docs
No docs
_get_missing_mandatory_fields (self)
Get mandatory fields that do not have any values
_init_child (self, value, key)
No docs
No docs
No docs
No docs
_validate_update_after_submit (self)
No docs
append (self, key, value=None)
No docs
as_dict (self, no_nulls=False, no_default_fields=False)
No docs
No docs
No docs
INSERT the document (with valid columns) in the database.
db_set (self, fieldname, value, update_modified=True)
No docs
No docs
No docs
No docs
get (self, key=None, filters=None, limit=None, default=None)
No docs
No docs
get_formatted (self, fieldname, doc=None, currency=None, absolute_value=False)
No docs
get_invalid_links (self, is_submittable=False)
No docs
get_parentfield_of_doctype (self, doctype)
No docs
get_table_field_doctype (self, fieldname)
No docs
No docs
get_valid_dict (self, sanitize=True)
No docs
No docs
getone (self, key, filters=None)
No docs
in_format_data (self, fieldname)
Returns True if shown via Print Format::format_data
property.
Called from within standard print format.
No docs
No docs
is_print_hide (self, fieldname, df=None, for_print=True)
Returns true if fieldname is to be hidden for print.
Print Hide can be set via the Print Format Builder or in the controller as a list of hidden fields. Example
class MyDoc(Document):
def __setup__(self):
self.print_hide = ["field1", "field2"]
Parameters:
fieldname
- Fieldname to be checked if hidden.precision (self, fieldname, parentfield=None)
Returns float precision for a particular field (or get global default).
Parameters:
fieldname
- Fieldname for which precision is required.parentfield
- If fieldname is in child table.No docs
reset_values_if_no_permlevel_access (self, has_access_to, high_permlevel_fields)
If the user does not have permissions at permlevel > 0, then reset the values to original / default
set (self, key, value, as_value=False)
No docs
show_unique_validation_message (self, e)
No docs
No docs
No docs
frappe.model.base_document._filter (data, filters, limit=None)
pass filters as: {"key": "val", "key": ["!=", "val"], "key": ["in", "val"], "key": ["not in", "val"], "key": "^val", "key" : True (exists), "key": False (does not exist) }
frappe.model.base_document.get_controller (doctype)
Returns the class object of the given DocType.
For custom
type, returns frappe.model.document.Document
.
Parameters:
doctype
- DocType name as string.