mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-31 04:46:30 -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,
|
default=10,
|
||||||
help="Used to organise the category.")
|
help="Used to organise the category.")
|
||||||
|
|
||||||
|
parent_path = fields.Char(index=True)
|
||||||
complete_name = fields.Char(
|
complete_name = fields.Char(
|
||||||
'Complete Name', compute='_compute_complete_name',
|
'Complete Name', compute='_compute_complete_name',
|
||||||
store=True)
|
store=True)
|
||||||
|
|
||||||
|
image = fields.Binary(
|
||||||
|
"Image", attachment=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@api.depends('name', 'parent_id.complete_name')
|
@api.depends('name', 'parent_id.complete_name')
|
||||||
def _compute_complete_name(self):
|
def _compute_complete_name(self):
|
||||||
|
@ -64,9 +64,12 @@
|
|||||||
<field name="create_uid" />
|
<field name="create_uid" />
|
||||||
<field name="content_uid" />
|
<field name="content_uid" />
|
||||||
<group expand="0" string="Group By...">
|
<group expand="0" string="Group By...">
|
||||||
<filter name="group_by_category" string="Category" context="{'group_by':'parent_id'}"/>
|
<filter name="group_by_category" string="Category"
|
||||||
<filter name="group_by_author" string="Author" context="{'group_by':'create_uid'}"/>
|
context="{'group_by':'parent_id'}" />
|
||||||
<filter name="group_by_last_contributor" string="Last Contributor" context="{'group_by':'content_uid'}"/>
|
<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>
|
</group>
|
||||||
</search>
|
</search>
|
||||||
</field>
|
</field>
|
||||||
@ -84,25 +87,24 @@
|
|||||||
<field name="search_view_id" ref="view_document_category_filter" />
|
<field name="search_view_id" ref="view_document_category_filter" />
|
||||||
</record>
|
</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="sequence" eval="0" />
|
||||||
<field name="view_mode">tree</field>
|
<field name="view_mode">tree</field>
|
||||||
<field name="view_id" ref="view_category_tree" />
|
<field name="view_id" ref="view_category_tree" />
|
||||||
<field name="act_window_id" ref="action_category" />
|
<field name="act_window_id" ref="action_category" />
|
||||||
</record>
|
</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="sequence" eval="5" />
|
||||||
<field name="view_mode">form</field>
|
<field name="view_mode">form</field>
|
||||||
<field name="view_id" ref="view_category_form" />
|
<field name="view_id" ref="view_category_form" />
|
||||||
<field name="act_window_id" ref="action_category" />
|
<field name="act_window_id" ref="action_category" />
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<menuitem id="menu_category"
|
<menuitem id="menu_category" parent="menu_wiki"
|
||||||
parent="menu_wiki"
|
name="Categories" action="action_category" sequence="20" />
|
||||||
name="Categories"
|
|
||||||
action="action_category"
|
|
||||||
sequence="20"/>
|
|
||||||
|
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
Loading…
Reference in New Issue
Block a user