[gen] Bugfix: name clash when a transition is named 'comment'. [gen] Added AbstractWrapper::getHistoryComments allowing to collect comments of all history events of some type.
This commit is contained in:
parent
cf0309cb26
commit
424c0521de
4 changed files with 22 additions and 10 deletions
|
@ -36,7 +36,7 @@ class Action(Field):
|
|||
id=":formId" action=":zobj.absolute_url() + '/onExecuteAction'"
|
||||
style="display:inline">
|
||||
<input type="hidden" name="fieldName" value=":name"/>
|
||||
<input type="hidden" name="comment" value=""/>
|
||||
<input type="hidden" name="popupComment" value=""/>
|
||||
<input type="button" class=":css" title=":descr"
|
||||
var="textConfirm=field.confirm and _(field.labelId+'_confirm') or '';
|
||||
showComment=(field.confirm == 'text') and 'true' or 'false'"
|
||||
|
@ -91,10 +91,10 @@ class Action(Field):
|
|||
else: return method(obj)
|
||||
|
||||
def __call__(self, obj):
|
||||
'''Calls the action on p_obj.'''
|
||||
'''Calls the action on p_obj'''
|
||||
# Must we call the method(s) with a param ?
|
||||
hasParam = self.confirm == 'text'
|
||||
param = hasParam and obj.request.get('comment', None)
|
||||
param = hasParam and obj.request.get('popupComment', None)
|
||||
if type(self.action) in sutils.sequenceTypes:
|
||||
# There are multiple Python methods
|
||||
res = [True, '']
|
||||
|
|
|
@ -425,7 +425,8 @@ class Transition:
|
|||
'''Executed when a user wants to trigger this transition from the UI.'''
|
||||
tool = obj.getTool()
|
||||
# Trigger the transition
|
||||
msg = self.trigger(name, obj, wf, rq.get('comment', ''), reindex=False)
|
||||
msg = self.trigger(name, obj, wf, rq.get('popupComment', ''),
|
||||
reindex=False)
|
||||
# Reindex obj if required
|
||||
if not obj.isTemporary(): obj.reindex()
|
||||
# If we are called from an Ajax request, simply return msg
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue