Port to v10

This commit is contained in:
Leonardo Donelli
2016-12-22 12:43:02 +01:00
committed by mle
parent b0671b8223
commit bfe651f322
12 changed files with 138 additions and 200 deletions

View File

@@ -1,23 +1,6 @@
"""model's module imported."""
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
# Copyright 2016 MONK Software
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import ir_attachment
from . import res_config

View File

@@ -0,0 +1,8 @@
from odoo import fields, models
class IrAttachment(models.Model):
_inherit = 'ir.attachment'
# Add index to res_model because filtering on it is a common use case
res_model = fields.Char(index=True)

View File

@@ -1,30 +1,11 @@
"""KnowledgeConfigSettings class."""
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
# Copyright 2016 MONK Software
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp import models, fields
from odoo import models, fields
class KnowledgeConfigSettings(models.TransientModel):
"""This class in needed to activate document management."""
_name = 'knowledge.config.settings'
_inherit = 'res.config.settings'
@@ -34,28 +15,3 @@ class KnowledgeConfigSettings(models.TransientModel):
help='Document indexation, full text search of attachements.\n'
'- This installs the module document.'
)
module_document_page = fields.Boolean(
'Manage document pages (Wiki)',
help='Provide document page and category as a wiki.\n'
'- This installs the module document_page.'
)
module_document_page_approval = fields.Boolean(
'Manage documents approval',
help='Add workflow on documents per category.\n'
'- This installs the module document_page_approval.'
)
module_cmis_read = fields.Boolean(
'Attach files from an external DMS into Odoo',
help='Connect Odoo with a CMIS compatible server to attach files\n'
'to an Odoo record.\n'
'- This installs the module cmis_read.'
)
module_cmis_write = fields.Boolean(
'Store attachments in an external DMS instead of the Odoo Filestore',
help='Connect Odoo with a CMIS compatible server to store files.\n'
'- This installs the module cmis_write.'
)