[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.

[document_page] FIX BUG: UI hanging when editing content. This was due to the api.depends on _compute_diff. Removing it because it's not really necessary since the field is not stored.

[document_page] page_id should be readonly.

Improve active field

[document_page] Update version number

[UPD] Update document_page.pot

[MIG] document_page_multi_company (#188)

* [MIG] document_page_multi_company

Added this feature from the old module directly in document_page
This commit is contained in:
Iván Todorovich
2018-04-20 10:42:10 -03:00
committed by FernandoRomera
parent 1125031c74
commit 10aafc1ea3
7 changed files with 99 additions and 18 deletions

View File

@@ -24,6 +24,7 @@
<tree string="Document Page">
<field name="name"/>
<field name="parent_id"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="create_uid" invisible="1"/>
<field name="content_uid"/>
<field name="content_date"/>
@@ -38,6 +39,11 @@
<field name="arch" type="xml">
<form string="Document Page">
<sheet>
<div class="oe_button_box" name="button_box">
<button name="toggle_active" type="object" groups="document_page.group_document_manager" class="oe_stat_button" icon="fa-archive">
<field name="active" widget="boolean_button" options="{'terminology': 'archive'}"/>
</button>
</div>
<field name="type" invisible="1"/>
<h1>
<field name="name" placeholder="Name"/>
@@ -45,6 +51,7 @@
<group>
<group>
<field name="parent_id" string="Category" context="{'default_type':'category'}"/>
<field name="company_id" groups="base.group_multi_company"/>
</group>
<group>
<field name="content_uid"/>
@@ -54,17 +61,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"/>
@@ -39,18 +40,19 @@
<field name="arch" type="xml">
<form string="Document Page History">
<sheet>
<h1><field name="page_id"/></h1>
<h1><field name="page_id" readonly="1"/></h1>
<group>
<group>
<field name="create_uid" readonly="1"/>
<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">