[gen] Bugfixes.

This commit is contained in:
Gaetan Delannay 2014-12-15 19:36:00 +01:00
parent 50bd996c3b
commit 6cd64fdc50
4 changed files with 10 additions and 6 deletions

View file

@ -575,12 +575,12 @@ class Field:
if self.isEmptyValue(obj, value): return ''
return value
def getShownValue(self, obj, value, showChanges=False):
def getShownValue(self, obj, value, showChanges=False, language=None):
'''Similar to m_getFormattedValue, but in some contexts, only a part of
p_value must be shown. For example, sometimes we need to display only
a language-specific part of a multilingual field (see overridden
method in string.py).'''
return self.getFormattedValue(obj, value, showChanges)
return self.getFormattedValue(obj, value, showChanges, language)
def getXmlValue(self, obj, value):
'''This method allows a developer to customize the value that will be

View file

@ -29,7 +29,7 @@ class Action(Field):
pxView = pxCell = Px('''
<form var="formId='%s_%s_form' % (zobj.id, name);
label=_(field.labelId);
descr=field.descrId and _(field.descrId) or None;
descr=field.hasDescr and _(field.descrId) or None;
buttonWidth=ztool.getButtonWidth(label)"
id=":formId" action=":ztool.absolute_url() + '/do'"
style="display:inline">