mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-28 19:36:30 -06:00
Make document type smart button open its attachments
This commit is contained in:
parent
5369b52ed6
commit
9f8ca75e57
@ -51,6 +51,11 @@ Contributors
|
|||||||
|
|
||||||
* Leonardo Donelli @ MONK Software (leonardo.donelli@monksoftware.it)
|
* Leonardo Donelli @ MONK Software (leonardo.donelli@monksoftware.it)
|
||||||
|
|
||||||
|
Acknowledgements
|
||||||
|
----------------
|
||||||
|
|
||||||
|
* Thanks to gingitsune for showing me a simple way to open a 'Save and Close' dialog
|
||||||
|
|
||||||
Maintainer
|
Maintainer
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="ir_attachment_view_search_document_type" model="ir.ui.view">
|
<record id="ir_attachment_view_search_document_type" model="ir.ui.view">
|
||||||
<field name="name"></field>
|
<field name="name">Attachment search view: add document type filter and groupby</field>
|
||||||
<field name="model">ir.attachment</field>
|
<field name="model">ir.attachment</field>
|
||||||
<field name="inherit_id" ref="base.view_attachment_search"/>
|
<field name="inherit_id" ref="base.view_attachment_search"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
|
@ -7,6 +7,14 @@
|
|||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<record id="ir_attachment_action_document_type" model="ir.actions.act_window">
|
||||||
|
<field name="name">Documents</field>
|
||||||
|
<field name="res_model">ir.attachment</field>
|
||||||
|
<field name="view_type">form</field>
|
||||||
|
<field name="view_mode">tree,form</field>
|
||||||
|
<field name="context">{'search_default_document_type_id': [active_id], 'default_document_type_id': active_id}</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
<record id="document_type_view_form" model="ir.ui.view">
|
<record id="document_type_view_form" model="ir.ui.view">
|
||||||
<field name="name">Document types list view</field>
|
<field name="name">Document types list view</field>
|
||||||
<field name="model">document.type</field>
|
<field name="model">document.type</field>
|
||||||
@ -14,7 +22,7 @@
|
|||||||
<form>
|
<form>
|
||||||
<sheet>
|
<sheet>
|
||||||
<div class="oe_button_box" name="button_box">
|
<div class="oe_button_box" name="button_box">
|
||||||
<button name="documents" class="oe_stat_button" icon="fa-book">
|
<button name="%(ir_attachment_action_document_type)d" type="action" class="oe_stat_button" icon="fa-book">
|
||||||
<field name="documents_count" string="Documents" widget="statinfo"/>
|
<field name="documents_count" string="Documents" widget="statinfo"/>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user