[document_page] FIX creating history when there are no changes made. Add history name field, to name revisions. Modified views to allow setting this field.

This commit is contained in:
Iván Todorovich
2018-04-20 10:42:10 -03:00
parent e37d525e29
commit 31d95fe243
4 changed files with 31 additions and 13 deletions

View File

@@ -54,17 +54,21 @@
</group>
<notebook>
<page name="content" string="Content">
<label for="summary" class="oe_edit_only"/>
<field name="summary" placeholder="eg: Changed ... for ..." class="oe_edit_only"/>
<label for="content" class="oe_edit_only"/>
<field name="content" widget="html" placeholder="e.g. Once upon a time..." required="1"
options="{'safe': True}"/>
<group string="Revision" class="oe_edit_only">
<field name="draft_name" placeholder="Rev 01" class="oe_edit_only" />
<field name="draft_summary" placeholder="eg: Changed ... for ..." class="oe_edit_only" />
</group>
<div>
<label for="content" class="oe_edit_only"/>
<field name="content" widget="html" placeholder="e.g. Once upon a time..." required="1" options="{'safe': True}"/>
</div>
</page>
<page name="history" string="History">
<field name="history_ids">
<tree>
<field name="id"/>
<field name="create_date"/>
<field name="name"/>
<field name="summary"/>
<field name="create_uid"/>
</tree>

View File

@@ -9,6 +9,7 @@
<tree string="Document History">
<field name="id"/>
<field name="page_id"/>
<field name="name"/>
<field name="summary"/>
<field name="create_uid"/>
<field name="create_date"/>
@@ -46,11 +47,12 @@
<field name="create_date" readonly="1"/>
</group>
</group>
<group>
<field name="name" placeholder="Rev 01"/>
<field name="summary" placeholder="eg: Changed ... for ..."/>
</group>
<notebook>
<page name="content" string="Content">
<label for="summary"/>
<field name="summary" placeholder="eg: Changed ... for ..."/>
<label for="content"/>
<field name="content" widget="html" placeholder="e.g. Once upon a time..." options="{'safe': True}"/>
</page>
<page name="diff" string="Changes">