mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-23 04:22:04 -06:00
knowledge: migrations scripts
This commit is contained in:
parent
46ae3fd3b5
commit
eb33235513
13
knowledge/migrations/10.0.1.0.0/openupgrade_analysis.txt
Normal file
13
knowledge/migrations/10.0.1.0.0/openupgrade_analysis.txt
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
---Fields in module 'knowledge'---
|
||||||
|
---XML records in module 'knowledge'---
|
||||||
|
NEW ir.actions.act_window: knowledge.knowledge_action_documents
|
||||||
|
DEL ir.model.access: knowledge.access_ir_attachment_partner_manager
|
||||||
|
DEL ir.model.access: knowledge.access_ir_attachment_sale_manager
|
||||||
|
NEW ir.module.category: knowledge.module_category_knowledge
|
||||||
|
DEL ir.module.category: knowledge.module_category_knowledge_management
|
||||||
|
NEW ir.ui.menu: knowledge.menu_document_root
|
||||||
|
NEW ir.ui.menu: knowledge.menu_document_section
|
||||||
|
DEL ir.ui.menu: knowledge.menu_document2
|
||||||
|
NEW ir.ui.view: knowledge.ir_attachment_view_user_documents
|
||||||
|
NEW res.groups: knowledge.group_document_user
|
||||||
|
DEL res.groups: base.group_document_user
|
@ -0,0 +1,16 @@
|
|||||||
|
---Fields in module 'knowledge'---
|
||||||
|
---XML records in module 'knowledge'---
|
||||||
|
NEW ir.actions.act_window: knowledge.knowledge_action_documents
|
||||||
|
DEL ir.model.access: knowledge.access_ir_attachment_partner_manager
|
||||||
|
DEL ir.model.access: knowledge.access_ir_attachment_sale_manager
|
||||||
|
NEW ir.module.category: knowledge.module_category_knowledge
|
||||||
|
DEL ir.module.category: knowledge.module_category_knowledge_management
|
||||||
|
NEW ir.ui.menu: knowledge.menu_document_root
|
||||||
|
NEW ir.ui.menu: knowledge.menu_document_section
|
||||||
|
DEL ir.ui.menu: knowledge.menu_document2
|
||||||
|
NEW ir.ui.view: knowledge.ir_attachment_view_user_documents
|
||||||
|
# Nothing to do
|
||||||
|
NEW res.groups: knowledge.group_document_user
|
||||||
|
# Done: Rename XML-IDs
|
||||||
|
DEL res.groups: base.group_document_user
|
||||||
|
# Nothing to do: noupdate=0 records
|
14
knowledge/migrations/10.0.1.0.0/pre-migration.py
Normal file
14
knowledge/migrations/10.0.1.0.0/pre-migration.py
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright 2017 Eficent <http://www.eficent.com>
|
||||||
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||||
|
|
||||||
|
_xmlid_renames = [
|
||||||
|
('base.group_document_user', 'knowledge.group_document_user'),
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def migrate(cr, version):
|
||||||
|
for (old, new) in _xmlid_renames:
|
||||||
|
query = ("UPDATE ir_model_data SET module = %s, name = %s "
|
||||||
|
"WHERE module = %s and name = %s")
|
||||||
|
cr.execute(query, tuple(new.split('.') + old.split('.')))
|
Loading…
Reference in New Issue
Block a user