Last active
December 12, 2017 23:25
-
-
Save monroy95/9c2001ee1d490c06d8c8d086f468cbc8 to your computer and use it in GitHub Desktop.
Devuelve un propiedad del documento o una lista de propiedades.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Sintaxis: | |
# get_value(self, doctype, filters=None, fieldname=name, ignore=None, | |
# as_dict=False, debug=False, order_by=None, cache=False) | |
# Retorna el primer cliente que empiece con a | |
frappe.db.get_value('Customer', {'name': ('like a%')}) | |
# Retorna el ultimo acceso de **usuario** 'test@example.com' | |
frappe.db.get_value('user', 'test@example.com', 'last_login') | |
last_login, last_ip = frappe.db.get_value('user', 'test@example.com', | |
['last_login', 'last_ip']) | |
# Retorna el date_format default | |
frappe.db.get_value('System Settings', None, 'date_format') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment