Commit 0ad69af5 authored by Tatuya Kamada's avatar Tatuya Kamada

The Form Printout enables to create a ODF document,

using an ERP5 Form and an ODF template.

I and yo had long discussion, whether to invoke
an ODF template or an ERP5 form.
We selected an ERP5 Form to invoke, but because of 
some point of view, we changed the choice and decided
to create a new class to invoke to create a ODF document.

Why we decided to create a new class:

* Reusable of forms 
  If we invoke an ERP5 form to create an ODF document, we have to
  set a ODF template, and the view of the form fixes ODF.
  Thus the form can not use other cases such as html view.
  
* Consistency 
  Set a ODF template as well as page template, the forms has
  two ways two template. It has not consistency.

The Form Printout currently supports only ODT format document.
And the functions only supports paragraphs and tables.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26251 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 85952848
This diff is collapsed.
......@@ -45,7 +45,8 @@ ModuleSecurityInfo('Products.ERP5OOo.OOoUtils').declarePublic('newOOoParser',)
# Define object classes and tools
from OOoTemplate import OOoTemplate
object_classes = (OOoTemplate, )
from FormPrintout import FormPrintout
object_classes = (OOoTemplate, FormPrintout)
portal_tools = ()
content_classes = ()
content_constructors = ()
......
<dtml-var manage_page_header>
<dtml-var "manage_form_title(this(), _,
form_title='Add ERP5 Form Blueprint',
)">
<p class="form-help">
</p>
<form action="addFormPrintout" method="POST">
<table cellspacing="0" cellpadding="2" border="0">
<tr>
<td align="left" valign="top">
<div class="form-label">
Id
</div>
</td>
<td align="left" valign="top">
<input type="text" name="id" size="40" />
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-label">
Title
</div>
</td>
<td align="left" valign="top">
<input type="text" name="title" size="40" />
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-label">
Form Name
</div>
</td>
<td align="left" valign="top">
<input type="text" name="form_name" size="40" />
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-label">
Template
</div>
</td>
<td align="left" valign="top">
<input type="text" name="template" size="40" />
</td>
</tr>
<tr>
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<div class="form-element">
<input class="form-element" type="submit" name="submit"
value=" Add " />
<input class="form-element" type="submit" name="submit"
value=" Add and Edit " />
</div>
</td>
</tr>
</table>
</form>
<dtml-var manage_page_footer>
This diff is collapsed.
<h1 tal:replace="structure here/manage_page_header">Header</h1>
<h2 tal:define="manage_tabs_message options/manage_tabs_message | nothing"
tal:replace="structure here/manage_tabs">Tabs</h2>
<form action="" method="post" tal:attributes="action request/URL1">
<input type="hidden" name=":default_method" value="doSettings">
<table width="100%" cellspacing="0" cellpadding="2" border="0">
<tr>
<td class="form-label">Title</td>
<td><input name="title" value="" type="text" size="20"
tal:attributes="value request/title | here/title | nothing"/></td>
</tr>
<tr>
<td class="form-label">Form Name</td>
<td><input name="form_name" value="default_form_name" type="text" size="20"
tal:attributes="value request/form_name | here/form_name | nothing"/></td>
</tr>
<tr>
<td class="form-label">Template</td>
<td><input name="template" value="default_template" type="text" size="20"
tal:attributes="value request/template | here/template | nothing"/></td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-element">
<em tal:condition="here/wl_isLocked">Locked by WebDAV</em>
<input tal:condition="not:here/wl_isLocked"
class="form-element" type="submit"
name="doSettings:method" value="Save Changes">
</div>
</td>
</tr>
</table>
</form>
<h1 tal:replace="structure here/manage_page_footer">Footer</h1>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment