mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-29 20:06:29 -06:00
[ADD]fields on category for oragnaising
[IMP]Image on category
This commit is contained in:
parent
d34e177de0
commit
a9bbc4a87a
@ -117,10 +117,15 @@ class DocumentPage(models.Model):
|
||||
default=10,
|
||||
help="Used to organise the category.")
|
||||
|
||||
parent_path = fields.Char(index=True)
|
||||
complete_name = fields.Char(
|
||||
'Complete Name', compute='_compute_complete_name',
|
||||
store=True)
|
||||
|
||||
image = fields.Binary(
|
||||
"Image", attachment=True,
|
||||
)
|
||||
|
||||
|
||||
@api.depends('name', 'parent_id.complete_name')
|
||||
def _compute_complete_name(self):
|
||||
|
@ -64,9 +64,12 @@
|
||||
<field name="create_uid" />
|
||||
<field name="content_uid" />
|
||||
<group expand="0" string="Group By...">
|
||||
<filter name="group_by_category" string="Category" context="{'group_by':'parent_id'}"/>
|
||||
<filter name="group_by_author" string="Author" context="{'group_by':'create_uid'}"/>
|
||||
<filter name="group_by_last_contributor" string="Last Contributor" context="{'group_by':'content_uid'}"/>
|
||||
<filter name="group_by_category" string="Category"
|
||||
context="{'group_by':'parent_id'}" />
|
||||
<filter name="group_by_author" string="Author"
|
||||
context="{'group_by':'create_uid'}" />
|
||||
<filter name="group_by_last_contributor"
|
||||
string="Last Contributor" context="{'group_by':'content_uid'}" />
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
@ -84,25 +87,24 @@
|
||||
<field name="search_view_id" ref="view_document_category_filter" />
|
||||
</record>
|
||||
|
||||
<record id="action_category_view_tree" model="ir.actions.act_window.view">
|
||||
<record id="action_category_view_tree"
|
||||
model="ir.actions.act_window.view">
|
||||
<field name="sequence" eval="0" />
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="view_category_tree" />
|
||||
<field name="act_window_id" ref="action_category" />
|
||||
</record>
|
||||
|
||||
<record id="action_category_view_form" model="ir.actions.act_window.view">
|
||||
<record id="action_category_view_form"
|
||||
model="ir.actions.act_window.view">
|
||||
<field name="sequence" eval="5" />
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="view_category_form" />
|
||||
<field name="act_window_id" ref="action_category" />
|
||||
</record>
|
||||
|
||||
<menuitem id="menu_category"
|
||||
parent="menu_wiki"
|
||||
name="Categories"
|
||||
action="action_category"
|
||||
sequence="20"/>
|
||||
<menuitem id="menu_category" parent="menu_wiki"
|
||||
name="Categories" action="action_category" sequence="20" />
|
||||
|
||||
|
||||
</odoo>
|
||||
|
Loading…
Reference in New Issue
Block a user