From 37c7d2c0afddb0bb9cbe4ab6edac75e425c29c41 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Thu, 21 Jan 2010 14:21:18 +0100 Subject: [PATCH] [imp] add docstring to explain how default_get works/what it does bzr revid: xmo@tinyerp.com-20100121132118-zvvpi168d8vdzbgb --- bin/osv/orm.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 223c2875f03..f1306be7fc2 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -932,6 +932,17 @@ class orm_template(object): self._invalids.clear() def default_get(self, cr, uid, fields_list, context=None): + """ Set default values for the object's fields. + + Returns a dict of {field_name:default_value} + + Arguments: + `fields_list`: the fields for which the object doesn't have + any value yet, and default values need to be + provided. If fields outside this list are + returned, the user-provided values will be + overwritten. + """ return {} def perm_read(self, cr, user, ids, context=None, details=True):