workflows: stay in (front/back)office after generating a document (#8447)
This commit is contained in:
parent
e2b5a50b5a
commit
1688c973c1
|
@ -1689,13 +1689,14 @@ class ExportToModel(WorkflowStatusItem):
|
|||
if form.get_submit() == 'button%s' % self.id:
|
||||
if not evo.comment:
|
||||
evo.comment = _('Form exported in a model')
|
||||
in_backoffice = get_request() and get_request().is_in_backoffice()
|
||||
if self.attach_to_history:
|
||||
evo.add_part(AttachmentEvolutionPart(
|
||||
self.model_file.base_filename,
|
||||
StringIO(self.apply_template_to_formdata(formdata)),
|
||||
content_type=self.model_file.content_type))
|
||||
return formdata.get_url()
|
||||
return formdata.get_url() + self.get_directory_name()
|
||||
return formdata.get_url(backoffice=in_backoffice)
|
||||
return formdata.get_url(backoffice=in_backoffice) + self.get_directory_name()
|
||||
|
||||
def model_file_validation(self, upload):
|
||||
if upload.content_type and upload.content_type == 'application/rtf':
|
||||
|
|
Loading…
Reference in New Issue