Set a value on the model_file field of the ExportToModel settings form

This commit is contained in:
Benjamin Dauvergne 2011-06-21 20:08:15 +00:00
parent 290221c526
commit 372bc5be24
1 changed files with 2 additions and 1 deletions

View File

@ -873,7 +873,8 @@ class ExportToModel(WorkflowStatusItem):
hint = htmltext('<div>%s: <a href="?file=%s">%s</a></div>') % \
(_('Current value'), widget_name, value.base_filename) + hint
form.add(UploadWidget, widget_name, directory='models',
filename=filename, title=_('Model'), hint=hint, validation=self.model_file_validation)
filename=filename, title=_('Model'), hint=hint,
validation=self.model_file_validation, value=value)
def get_directory_name(self):
return qommon.misc.simplify(self.label or 'export_to_model', space='_')