Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[11.0][knowledge][document_page]Fixing items' link error. #184

Merged
merged 2 commits into from
Sep 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
10 changes: 6 additions & 4 deletions knowledge/views/knowledge.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,20 @@
id="menu_document_root"
name="Knowledge"
groups="knowledge.group_document_user"
sequence="116"/>
sequence="116"
web_icon="knowledge,static/description/icon.png"/>

<menuitem
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>