[Erp5-report] r31802 seb - /erp5/trunk/products/ERP5Type/Base.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Jan 18 17:21:56 CET 2010


Author: seb
Date: Mon Jan 18 17:21:40 2010
New Revision: 31802

URL: http://svn.erp5.org?rev=31802&view=rev
Log:
add docstring on asContext

Modified:
    erp5/trunk/products/ERP5Type/Base.py

Modified: erp5/trunk/products/ERP5Type/Base.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Base.py?rev=31802&r1=31801&r2=31802&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Base.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Base.py [utf8] Mon Jan 18 17:21:40 2010
@@ -2784,6 +2784,12 @@
   # Context related methods
   security.declarePublic('asContext')
   def asContext(self, context=None, REQUEST=None, **kw):
+    """
+    Allows to have a kind of temp copy of an object edited with kw
+    parameters. This is somewhat equivalent to use tempObject.
+
+    ex : joe_person = person_module.bob_person.asContext(first_name='Joe')
+    """
     if context is None:
       # Make a copy
       klass = self.__class__




More information about the Erp5-report mailing list