Skip to content

Commit

Permalink
Merge pull request #184 from SalahAdDin/patch-2
Browse files Browse the repository at this point in the history
[11.0][knowledge][document_page]Fixing items' link error.
  • Loading branch information
max3903 committed Sep 10, 2018
2 parents 9b59bae + 08e88db commit e37d525
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 33 deletions.
65 changes: 35 additions & 30 deletions document_page/views/document_page.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@
<form string="Document Page">
<sheet>
<field name="type" invisible="1"/>
<h1><field name="name" placeholder="Name"/></h1>
<h1>
<field name="name" placeholder="Name"/>
</h1>
<group>
<group>
<field name="parent_id" string="Category" context="{'default_type':'category'}"/>
Expand All @@ -52,10 +54,11 @@
</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="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}"/>
<field name="content" widget="html" placeholder="e.g. Once upon a time..." required="1"
options="{'safe': True}"/>
</page>
<page name="history" string="History">
<field name="history_ids">
Expand Down Expand Up @@ -83,7 +86,9 @@
<field name="arch" type="xml">
<form string="Document Page">
<field name="type" invisible="1"/>
<h1><field name="name" placeholder="Name"/></h1>
<h1>
<field name="name" placeholder="Name"/>
</h1>
<field name="content" class="oe_view_only" required="1" options='{"safe": True}'/>
</form>
</field>
Expand All @@ -95,14 +100,15 @@
<field name="model">document.page</field>
<field name="arch" type="xml">
<search string="Document Page">
<field name="name" string="Content" filter_domain="['|', ('name','ilike',self), ('content','ilike',self)]"/>
<field name="name" string="Content"
filter_domain="['|', ('name','ilike',self), ('content','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'}" />
<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>
Expand All @@ -120,48 +126,47 @@
<field name="view_id" ref="view_wiki_tree"/>
<field name="search_view_id" ref="view_wiki_filter"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to create a new web page.
</p>
<p class="oe_view_nocontent_create">
Click to create a new web page.
</p>
</field>
</record>

<record id="action_page_view_tree" model="ir.actions.act_window.view">
<field name="sequence" eval="0" />
<field name="sequence" eval="0"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="view_wiki_tree"/>
<field name="act_window_id" ref="action_page"/>
</record>

<record id="action_page_view_form" model="ir.actions.act_window.view">
<field name="sequence" eval="5" />
<field name="sequence" eval="5"/>
<field name="view_mode">form</field>
<field name="view_id" ref="view_wiki_form"/>
<field name="act_window_id" ref="action_page"/>
</record>



<menuitem id="menu_wiki"
name="Pages"
parent="knowledge.menu_document"
sequence="20" />
<menuitem id="menu_wiki"
name="Pages"
parent="knowledge.menu_document_section"
sequence="10"/>


<menuitem id="menu_page"
name="Pages"
parent="menu_wiki"
action="action_page"
sequence="10" />
name="Pages"
parent="menu_wiki"
action="action_page"
sequence="20"/>


<act_window
id="action_related_page_create_menu"
name="Create Menu"
res_model="document.page.create.menu"
target="new"
view_type="form"
view_mode="form"
src_model="document.page"/>
id="action_related_page_create_menu"
name="Create Menu"
res_model="document.page.create.menu"
target="new"
view_type="form"
view_mode="form"
src_model="document.page"/>

</odoo>
7 changes: 4 additions & 3 deletions knowledge/views/knowledge.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,13 @@
id="menu_document_section"
name="Documents"
groups="knowledge.group_document_user"
parent="menu_document_root"/>
parent="menu_document_root"
sequence="10"/>

<menuitem
id="menu_document"
name="Documents"
action="knowledge_action_documents"
parent="menu_document_section"/>

parent="menu_document_section"
sequence="0"/>
</odoo>

0 comments on commit e37d525

Please sign in to comment.