mirror of
https://github.com/OCA/knowledge.git
synced 2025-12-21 04:42:18 -06:00
[11.0][IMP] document_page:
* move menus to a higher level. * fix categories search view. * fix create menu action not being accessible in any way. * reorder form view, focusing in the content, not in secondary fields.
This commit is contained in:
committed by
Justine Doutreloux
parent
9b33f6d8d3
commit
729913c1f1
@@ -49,26 +49,25 @@
|
||||
<field name="name" placeholder="Name"/>
|
||||
</h1>
|
||||
<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"/>
|
||||
<field name="content_date"/>
|
||||
<field name="menu_id" readonly="1" attrs="{'invisible': [('menu_id','=',False)]}"/>
|
||||
</group>
|
||||
<div>
|
||||
<field name="content" widget="html" placeholder="e.g. Once upon a time..." required="1" options="{'safe': True}"/>
|
||||
</div>
|
||||
</group>
|
||||
<notebook>
|
||||
<page name="content" string="Content">
|
||||
<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" />
|
||||
<page name="info" string="Information">
|
||||
<group>
|
||||
<group>
|
||||
<field name="parent_id" string="Category" context="{'default_type':'category'}"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="content_uid"/>
|
||||
<field name="content_date"/>
|
||||
<field name="menu_id" readonly="1" attrs="{'invisible': [('menu_id','=',False)]}"/>
|
||||
</group>
|
||||
<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>
|
||||
</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">
|
||||
@@ -95,12 +94,12 @@
|
||||
<field name="name">document.page.menu.form</field>
|
||||
<field name="model">document.page</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Document Page">
|
||||
<form string="Document Page" create="0">
|
||||
<field name="type" invisible="1"/>
|
||||
<h1>
|
||||
<field name="name" placeholder="Name"/>
|
||||
</h1>
|
||||
<field name="content" class="oe_view_only" required="1" options='{"safe": True}'/>
|
||||
<field name="content" widget="html" class="oe_view_only" required="1" options='{"safe": True}'/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
@@ -160,7 +159,7 @@
|
||||
|
||||
<menuitem id="menu_wiki"
|
||||
name="Pages"
|
||||
parent="knowledge.menu_document_section"
|
||||
parent="knowledge.menu_document_root"
|
||||
sequence="10"/>
|
||||
|
||||
|
||||
|
||||
@@ -51,6 +51,24 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_document_category_filter" model="ir.ui.view">
|
||||
<field name="name">document.page.category.search</field>
|
||||
<field name="model">document.page</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Document Category">
|
||||
<field name="name" string="Content"
|
||||
filter_domain="['|', ('name','ilike',self), ('template','ilike',self)]"/>
|
||||
<field name="parent_id"/>
|
||||
<field name="create_uid"/>
|
||||
<field name="content_uid"/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Category" context="{'group_by':'parent_id'}"/>
|
||||
<filter string="Author" context="{'group_by':'create_uid'}"/>
|
||||
<filter string="Last Contributor" context="{'group_by':'content_uid'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Category Action -->
|
||||
<record id="action_category" model="ir.actions.act_window">
|
||||
@@ -61,7 +79,7 @@
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_category_tree"/>
|
||||
<field name="search_view_id" ref="view_wiki_filter"/>
|
||||
<field name="search_view_id" ref="view_document_category_filter"/>
|
||||
</record>
|
||||
|
||||
<record id="action_category_view_tree" model="ir.actions.act_window.view">
|
||||
|
||||
Reference in New Issue
Block a user