mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-26 18:38:41 -06:00
[MIG] knowledge: Migration to 11.0
This commit is contained in:
parent
2535cdec0a
commit
7c12b329a6
@ -3,7 +3,9 @@
|
|||||||
|
|
||||||
<record model="ir.module.category" id="module_category_knowledge">
|
<record model="ir.module.category" id="module_category_knowledge">
|
||||||
<field name="name">Knowledge</field>
|
<field name="name">Knowledge</field>
|
||||||
<field name="description">Manage documents and knowledge-related applications</field>
|
<field name="description">Manage documents and knowledge-related
|
||||||
|
applications
|
||||||
|
</field>
|
||||||
<field name="sequence">30</field>
|
<field name="sequence">30</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
@ -6,7 +6,6 @@ from odoo import fields, models
|
|||||||
|
|
||||||
class KnowledgeConfigSettings(models.TransientModel):
|
class KnowledgeConfigSettings(models.TransientModel):
|
||||||
|
|
||||||
_name = 'knowledge.config.settings'
|
|
||||||
_inherit = 'res.config.settings'
|
_inherit = 'res.config.settings'
|
||||||
|
|
||||||
module_document = fields.Boolean(
|
module_document = fields.Boolean(
|
||||||
@ -39,3 +38,34 @@ class KnowledgeConfigSettings(models.TransientModel):
|
|||||||
help='Connect Odoo with a CMIS compatible server to store files.\n'
|
help='Connect Odoo with a CMIS compatible server to store files.\n'
|
||||||
'- This installs the module cmis_write.'
|
'- This installs the module cmis_write.'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def get_values(self):
|
||||||
|
res = super(KnowledgeConfigSettings, self).get_values()
|
||||||
|
get_param = self.env['ir.config_parameter'].sudo().get_param
|
||||||
|
res.update(
|
||||||
|
module_document=get_param(
|
||||||
|
'knowledge.module_document'),
|
||||||
|
module_document_page=get_param(
|
||||||
|
'knowledge.module_document_page'),
|
||||||
|
module_document_page_approval=get_param(
|
||||||
|
'knowledge.module_document_page_approval'),
|
||||||
|
module_cmis_read=get_param(
|
||||||
|
'knowledge.module_cmis_read'),
|
||||||
|
module_cmis_write=get_param(
|
||||||
|
'knowledge.module_cmis_write'),
|
||||||
|
)
|
||||||
|
return res
|
||||||
|
|
||||||
|
def set_values(self):
|
||||||
|
super(KnowledgeConfigSettings, self).set_values()
|
||||||
|
set_param = self.env['ir.config_parameter'].sudo().set_param
|
||||||
|
set_param('knowledge.module_document',
|
||||||
|
self.module_document)
|
||||||
|
set_param('knowledge.module_document_page',
|
||||||
|
self.module_document_page)
|
||||||
|
set_param('knowledge.module_document_page_approval',
|
||||||
|
self.module_document_page_approval)
|
||||||
|
set_param('knowledge.module_cmis_read',
|
||||||
|
self.module_cmis_read)
|
||||||
|
set_param('knowledge.module_cmis_write',
|
||||||
|
self.module_cmis_write)
|
||||||
|
@ -20,7 +20,8 @@
|
|||||||
<filter name="user_documents" string="Documents"
|
<filter name="user_documents" string="Documents"
|
||||||
domain="[('res_model', 'not like', 'ir.%'), ('res_model', '!=', False)]"/>
|
domain="[('res_model', 'not like', 'ir.%'), ('res_model', '!=', False)]"/>
|
||||||
<group string="Group by">
|
<group string="Group by">
|
||||||
<filter name="group_model" string="Model" context="{'group_by': 'res_model'}"/>
|
<filter name="group_model" string="Model"
|
||||||
|
context="{'group_by': 'res_model'}"/>
|
||||||
</group>
|
</group>
|
||||||
</search>
|
</search>
|
||||||
</field>
|
</field>
|
||||||
@ -28,26 +29,26 @@
|
|||||||
|
|
||||||
<!-- Top menu item -->
|
<!-- Top menu item -->
|
||||||
<menuitem
|
<menuitem
|
||||||
id="menu_document_root"
|
id="menu_document_root"
|
||||||
name="Knowledge"
|
name="Knowledge"
|
||||||
groups="base.group_system,knowledge.group_document_user"
|
groups="base.group_system,knowledge.group_document_user"
|
||||||
sequence="116"/>
|
sequence="116"/>
|
||||||
|
|
||||||
<menuitem
|
<menuitem
|
||||||
id="menu_document_configuration"
|
id="menu_document_configuration"
|
||||||
name="Configuration"
|
name="Configuration"
|
||||||
parent="menu_document_root"
|
parent="menu_document_root"
|
||||||
sequence="50"/>
|
sequence="50"/>
|
||||||
|
|
||||||
<menuitem
|
<menuitem
|
||||||
id="menu_document_section"
|
id="menu_document_section"
|
||||||
name="Documents"
|
name="Documents"
|
||||||
parent="menu_document_root"/>
|
parent="menu_document_root"/>
|
||||||
|
|
||||||
<menuitem
|
<menuitem
|
||||||
id="menu_document"
|
id="menu_document"
|
||||||
name="Documents"
|
name="Documents"
|
||||||
action="knowledge_action_documents"
|
action="knowledge_action_documents"
|
||||||
parent="menu_document_section"/>
|
parent="menu_document_section"/>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
@ -2,62 +2,65 @@
|
|||||||
<odoo>
|
<odoo>
|
||||||
|
|
||||||
<record id="view_knowledge_configuration" model="ir.ui.view">
|
<record id="view_knowledge_configuration" model="ir.ui.view">
|
||||||
<field name="name">Configure Knowledge</field>
|
<field name="name">res.config.settings.view.form.inherit.knowledge</field>
|
||||||
<field name="model">knowledge.config.settings</field>
|
<field name="model">res.config.settings</field>
|
||||||
|
<field name="inherit_id" ref="base.res_config_settings_view_form"/>
|
||||||
|
<field name="priority" eval="90"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Configure Knowledge" class= "oe_form_configuration">
|
<xpath expr="//div[hasclass('settings')]" position="inside">
|
||||||
<header>
|
<div class="app_settings_block" data-string="Knowledge"
|
||||||
<button string="Apply" type="object" name="execute" class="oe_highlight"/>
|
string="Knowledge" data-key="knowledge">
|
||||||
or
|
<h2>Knowledge and Documents Management</h2>
|
||||||
<button string="Cancel" type="object" name="cancel" class="oe_link"/>
|
<div class="row mt16 o_settings_container"
|
||||||
</header>
|
id="maintenance_mode_setting">
|
||||||
<separator string="Knowledge and Documents Management"/>
|
<div class="col-xs-12 col-md-12 o_setting_box">
|
||||||
<group>
|
<div class="o_setting_left_pane">
|
||||||
<label for="id" string="Documents"/>
|
<field name="module_document"/>
|
||||||
<div>
|
</div>
|
||||||
<div>
|
<div class="o_setting_right_pane">
|
||||||
<field name="module_document" class="oe_inline"/>
|
<label for="module_document"/>
|
||||||
<label for="module_document"/>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="col-xs-12 col-md-12 o_setting_box">
|
||||||
<field name="module_document_page" class="oe_inline"/>
|
<div class="o_setting_left_pane">
|
||||||
<label for="module_document_page"/>
|
<field name="module_document_page"/>
|
||||||
|
</div>
|
||||||
|
<div class="o_setting_right_pane">
|
||||||
|
<label for="module_document_page"/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="col-xs-12 col-md-12 o_setting_box">
|
||||||
<field name="module_document_page_approval" class="oe_inline"/>
|
<div class="o_setting_left_pane">
|
||||||
<label for="module_document_page_approval"/>
|
<field name="module_document_page_approval"/>
|
||||||
|
</div>
|
||||||
|
<div class="o_setting_right_pane">
|
||||||
|
<label for="module_document_page_approval"/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</group>
|
<h2>Connect with an external DMS</h2>
|
||||||
<separator string="Connect with an external DMS"/>
|
<div class="row mt16 o_settings_container"
|
||||||
<group>
|
id="maintenance_notification_setting">
|
||||||
<label for="id" string="Using CMIS"/>
|
<div class="col-xs-12 col-md-12 o_setting_box">
|
||||||
<div>
|
<div class="o_setting_left_pane">
|
||||||
<div>
|
<field name="module_cmis_read"/>
|
||||||
<field name="module_cmis_read" class="oe_inline"/>
|
</div>
|
||||||
<label for="module_cmis_read"/>
|
<div class="o_setting_right_pane">
|
||||||
|
<label for="module_cmis_read"/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="col-xs-12 col-md-12 o_setting_box">
|
||||||
<field name="module_cmis_write" class="oe_inline"/>
|
<div class="o_setting_left_pane">
|
||||||
<label for="module_cmis_write"/>
|
<field name="module_cmis_write"/>
|
||||||
|
</div>
|
||||||
|
<div class="o_setting_right_pane">
|
||||||
|
<label for="module_cmis_write"/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</group>
|
</div>
|
||||||
</form>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
<record id="action_knowledge_configuration" model="ir.actions.act_window">
|
</odoo>
|
||||||
<field name="name">Configure Knowledge</field>
|
|
||||||
<field name="res_model">knowledge.config.settings</field>
|
|
||||||
<field name="view_mode">form</field>
|
|
||||||
<field name="target">inline</field>
|
|
||||||
</record>
|
|
||||||
|
|
||||||
<menuitem id="menu_knowledge_configuration"
|
|
||||||
name="Settings"
|
|
||||||
parent="knowledge.menu_document_configuration"
|
|
||||||
sequence="19"
|
|
||||||
action="action_knowledge_configuration"/>
|
|
||||||
|
|
||||||
</odoo>
|
|
Loading…
Reference in New Issue
Block a user