diff --git a/addons/portal_stock/__init__.py b/addons/portal_stock/__init__.py new file mode 100644 index 00000000000..26c654db9dd --- /dev/null +++ b/addons/portal_stock/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# 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 . +# +############################################################################## + diff --git a/addons/portal_stock/__openerp__.py b/addons/portal_stock/__openerp__.py new file mode 100644 index 00000000000..87600b99dcb --- /dev/null +++ b/addons/portal_stock/__openerp__.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# 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 . +# +############################################################################## + + +{ + 'name': 'Portal Stock', + 'version': '0.1', + 'category': 'Tools', + 'complexity': 'easy', + 'description': """ +This module adds access rules to your portal if stock and portal are installed. +========================================================================================== + """, + 'author': 'OpenERP SA', + 'depends': ['sale_stock','portal'], + 'data': [ + 'security/portal_security.xml', + 'security/ir.model.access.csv', + ], + 'installable': True, + 'auto_install': True, + 'category': 'Hidden', +} +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/portal_stock/security/ir.model.access.csv b/addons/portal_stock/security/ir.model.access.csv new file mode 100644 index 00000000000..2cf3f3f13b7 --- /dev/null +++ b/addons/portal_stock/security/ir.model.access.csv @@ -0,0 +1,5 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_stock_picking,stock.picking,stock.model_stock_picking,portal.group_portal,1,0,0,0 +access_stock_picking.out,stock.picking.out,stock.model_stock_picking_out,portal.group_portal,1,0,0,0 +access_stock_move,stock.move,stock.model_stock_move,portal.group_portal,1,0,0,0 +access_stock_warehouse_orderpoint,stock.warehouse.orderpoint,procurement.model_stock_warehouse_orderpoint,portal.group_portal,1,0,0,0 diff --git a/addons/portal_stock/security/portal_security.xml b/addons/portal_stock/security/portal_security.xml new file mode 100644 index 00000000000..154a7fc9ddd --- /dev/null +++ b/addons/portal_stock/security/portal_security.xml @@ -0,0 +1,35 @@ + + + + + + + Portal Personal Pickings + + [('message_follower_ids','in',[user.partner_id.id])] + + + + + Portal Personal Out Pickings + + [('message_follower_ids','in',[user.partner_id.id])] + + + + + Portal Personal Stock Moves + + [('message_follower_ids','in',[user.partner_id.id])] + + + + + Portal Personal Stock Warehouse Orderpoints + + [('message_follower_ids','in',[user.partner_id.id])] + + + + +