0001-workflows-export-as-PDF-by-default-when-available-31.patch
tests/test_form_pages.py | ||
---|---|---|
2912 | 2912 |
wf = Workflow(name='status') |
2913 | 2913 |
st1 = wf.add_status('Status1', 'st1') |
2914 | 2914 |
export_to = ExportToModel() |
2915 |
export_to.convert_to_pdf = False |
|
2915 | 2916 |
export_to.label = 'create doc' |
2916 | 2917 |
upload = QuixoteUpload('/foo/test.rtf', content_type='application/rtf') |
2917 | 2918 |
upload.fp = StringIO.StringIO() |
... | ... | |
3001 | 3002 |
wf = Workflow(name='status') |
3002 | 3003 |
st1 = wf.add_status('Status1', 'st1') |
3003 | 3004 |
export_to = ExportToModel() |
3005 |
export_to.convert_to_pdf = False |
|
3004 | 3006 |
export_to.label = 'create doc' |
3005 | 3007 |
template_filename = os.path.join(os.path.dirname(__file__), odt_template) |
3006 | 3008 |
template = open(template_filename).read() |
... | ... | |
3088 | 3090 |
wf = Workflow(name='status') |
3089 | 3091 |
st1 = wf.add_status('Status1', 'st1') |
3090 | 3092 |
export_to = ExportToModel() |
3093 |
export_to.convert_to_pdf = False |
|
3091 | 3094 |
export_to.label = 'create doc' |
3092 | 3095 |
export_to.varname = 'created_doc' |
3093 | 3096 |
template_filename = os.path.join(os.path.dirname(__file__), 'template.odt') |
... | ... | |
3361 | 3364 |
wf = Workflow(name='status') |
3362 | 3365 |
st1 = wf.add_status('Status1', 'st1') |
3363 | 3366 |
export_to = ExportToModel() |
3367 |
export_to.convert_to_pdf = False |
|
3364 | 3368 |
export_to.method = 'non-interactive' |
3365 | 3369 |
template_filename = os.path.join(os.path.dirname(__file__), 'template.odt') |
3366 | 3370 |
template = open(template_filename).read() |
... | ... | |
3420 | 3424 | |
3421 | 3425 |
st1 = wf.add_status('Status1', 'st1') |
3422 | 3426 |
export_to = ExportToModel() |
3427 |
export_to.convert_to_pdf = False |
|
3423 | 3428 |
export_to.method = 'non-interactive' |
3424 | 3429 |
template_filename = os.path.join(os.path.dirname(__file__), 'template.odt') |
3425 | 3430 |
template = open(template_filename).read() |
tests/test_workflows.py | ||
---|---|---|
2750 | 2750 |
pub.substitutions.feed(formdata) |
2751 | 2751 | |
2752 | 2752 |
item = ExportToModel() |
2753 |
item.convert_to_pdf = False |
|
2753 | 2754 |
item.method = 'non-interactive' |
2754 | 2755 |
template_filename = os.path.join(os.path.dirname(__file__), 'template-with-image.odt') |
2755 | 2756 |
template = open(template_filename).read() |
... | ... | |
2811 | 2812 | |
2812 | 2813 |
item = ExportToModel() |
2813 | 2814 |
item.method = 'non-interactive' |
2815 |
item.convert_to_pdf = False |
|
2814 | 2816 |
template_filename = os.path.join(os.path.dirname(__file__), 'template.odt') |
2815 | 2817 |
template = open(template_filename).read() |
2816 | 2818 |
upload = QuixoteUpload('/foo/template.odt', content_type='application/octet-stream') |
... | ... | |
2875 | 2877 |
upload.fp.write(template) |
2876 | 2878 |
upload.fp.seek(0) |
2877 | 2879 |
item.model_file = UploadedFile(pub.app_dir, None, upload) |
2880 |
item.convert_to_pdf = False |
|
2878 | 2881 |
item.perform(formdata) |
2879 | 2882 | |
2880 | 2883 |
new_content = zipfile.ZipFile(open(formdata.evolution[0].parts[0].filename)).read('content.xml') |
wcs/wf/export_to_model.py | ||
---|---|---|
194 | 194 |
by = ['_receiver'] |
195 | 195 |
backoffice_info_text = None |
196 | 196 |
varname = None |
197 |
convert_to_pdf = False
|
|
197 |
convert_to_pdf = bool(transform_to_pdf)
|
|
198 | 198 |
push_to_portfolio = False |
199 | 199 |
method = 'interactive' |
200 | 200 |
backoffice_filefield_id = None |
201 |
- |