Skip to content

Commit

Permalink
9.0 base - cleanup share module
Browse files Browse the repository at this point in the history
  • Loading branch information
coleste committed Jan 14, 2016
1 parent f64f252 commit b8a0bdf
Show file tree
Hide file tree
Showing 5 changed files with 170 additions and 0 deletions.
24 changes: 24 additions & 0 deletions addons/share/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 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/>.
#
##############################################################################

import wizard

# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
53 changes: 53 additions & 0 deletions addons/share/__openerp__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010-2011 OpenERP SA (<http://www.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/>.
#
##############################################################################


{
'name' : 'Share any Document',
'version' : '2.0',
'depends' : ['base', 'mail'],
'author' : 'OpenERP SA',
'category': 'Tools',
'description': """
This module adds generic sharing tools to your current OpenERP database.
========================================================================
It specifically adds a 'share' button that is available in the Web client to
share any kind of OpenERP data with colleagues, customers, friends.
The system will work by creating new users and groups on the fly, and by
combining the appropriate access rights and ir.rules to ensure that the shared
users only have access to the data that has been shared with them.
This is extremely useful for collaborative work, knowledge sharing,
synchronization with other companies.
""",
'website': 'https://www.odoo.com',
'demo': [],
'data': [],
'installable': True,
'auto_install': True,
'web': True,
'qweb' : [],
}

# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
39 changes: 39 additions & 0 deletions addons/share/migrations/9.0.1.3/post-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenUpgrade module for Odoo
# @copyright 2014-Today: Odoo Community Association
# @author: Sylvain LE GAL <https://twitter.com/legalsylvain>
#
# 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/>.
#
##############################################################################

from openupgradelib import openupgrade
from openerp.modules.registry import RegistryManager
from openerp import SUPERUSER_ID


def remove_share_module(cr):
pool = RegistryManager.get(cr.dbname)
ir_module_module = pool['ir.module.module']
domain = [('name', '=', 'share'),
('state', 'in', ('installed', 'to install', 'to upgrade'))]
ids = ir_module_module.search(cr, SUPERUSER_ID, domain)
ir_module_module.module_uninstall(cr, SUPERUSER_ID, ids)


@openupgrade.migrate()
def migrate(cr, version):
remove_share_module(cr)
25 changes: 25 additions & 0 deletions addons/share/wizard/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 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/>.
#
##############################################################################

import share_wizard


# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
29 changes: 29 additions & 0 deletions addons/share/wizard/share_wizard.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 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/>.
#
##############################################################################
from openerp.osv import fields, osv


class share_wizard(osv.TransientModel):
_name = 'share.wizard'


class share_result_line(osv.osv_memory):
_name = 'share.wizard.result.line'

0 comments on commit b8a0bdf

Please sign in to comment.