From: Michael A R. M. <mi...@we...> - 2006-07-28 20:29:41
|
Hello, having a little problem, looking for insite. My Member subclass is set up to set the id based on the name, and dob of the member assigned. I have fields for Lastname, Firstname, Middlename, and DOB. From this I calculate the Initials, concatenate that with the DOB, and would like that assigned as the MemberID, so it will be the log in for the member. my member is TorchMember, subclassed from FolderishMember. Now, this works with my member subclass until I turn on portal_factory. Then when I create an object, I get an error about not having permission to rename the object, or that it doesn't support the operation.... Here is the abridged version of the error log. File "Script (Python)", line 11, in content_edit_impl File "/Users/michaelrowley/Zope-2.8.7/Products/CMFMember/content/ member.py", line 1020, in processForm ret = self.base_archetype.processForm(self, data, metadata, REQUEST, values) File "/Users/michaelrowley/Zope-2.8.7/Products/Archetypes/ BaseObject.py", line 631, in processForm REQUEST=REQUEST, values=values) File "/Users/michaelrowley/Zope-2.8.7/Products/Archetypes/ BaseObject.py", line 620, in _processForm mapply(mutator, result[0], **result[1]) File "/Users/michaelrowley/Zope-2.8.7/Products/Archetypes/ utils.py", line 145, in mapply return method(*call_args, **nkw) File "/Users/michaelrowley/Zope-2.8.7/Products/TORCH2/ torchpatient.py", line 218, in setId BaseMember.setId(self, newid) File "/Users/michaelrowley/Zope-2.8.7/Products/CMFMember/content/ member.py", line 1127, in setId memberdata.manage_renameObjects( (self.getId(),), (id,) ) File "/Users/michaelrowley/Zope-2.8.7/lib/python/OFS/ CopySupport.py", line 253, in manage_renameObjects self.manage_renameObject(ids[i], new_ids[i], REQUEST) File "/Users/michaelrowley/Zope-2.8.7/lib/python/OFS/ CopySupport.py", line 269, in manage_renameObject raise CopyError, eNotSupported % escape(id) Copy Error: <HTML> <HEAD> <TITLE>Not Supported</TITLE> </HEAD> <BODY BGCOLOR="#FFFFFF"> <FORM ACTION="manage_main" METHOD="GET" > <TABLE BORDER="0" WIDTH="100%" CELLPADDING="10"> <TR> <TD VALIGN="TOP"> <BR> <CENTER><B><FONT SIZE="+6" COLOR="#77003B">!</FONT></B></CENTER> </TD> <TD VALIGN="TOP"> <BR><BR> <CENTER> The action against the <em>patient.2006-07-16.0843577574</em> object could not be carried out. One of the following constraints caused the problem: <br><br>The object does not support this operation.<br><br>-- OR --<br><br>The currently logged-in user does not have the <b>Copy or Move</b> permission respective to the object. </CENTER> </TD> </TR> Here is the code that gives the error: def setId(self, id): newid = self.defaultId() LOG.info('newid: %s' % newid) BaseMember.setId(self, newid) Any input on how to do this? |