From f8ebf98c9629c6c2f52878fcf9e2a2d236fd550a Mon Sep 17 00:00:00 2001 From: "vta vta@openerp.com" <> Date: Fri, 30 Nov 2012 16:13:10 +0100 Subject: [PATCH] [FIX] Better distribution of access rules for SO when stock is installed. bzr revid: vta@openerp.com-20121130151310-b80fmgq0a9veogt0 --- .../portal_sale/security/ir.model.access.csv | 4 -- addons/portal_stock/__init__.py | 21 ++++++++++ addons/portal_stock/__openerp__.py | 41 +++++++++++++++++++ .../portal_stock/security/ir.model.access.csv | 5 +++ 4 files changed, 67 insertions(+), 4 deletions(-) create mode 100644 addons/portal_stock/__init__.py create mode 100644 addons/portal_stock/__openerp__.py create mode 100644 addons/portal_stock/security/ir.model.access.csv diff --git a/addons/portal_sale/security/ir.model.access.csv b/addons/portal_sale/security/ir.model.access.csv index 5f9ed99ecd9..c73be67e8c9 100644 --- a/addons/portal_sale/security/ir.model.access.csv +++ b/addons/portal_sale/security/ir.model.access.csv @@ -19,7 +19,3 @@ access_account_fiscalyear,account.fiscalyear,account.model_account_fiscalyear,po access_res_partner_category,res.partner.category,base.model_res_partner_category,portal.group_portal,1,0,0,0 access_account_period,account.period,account.model_account_period,portal.group_portal,1,0,0,0 access_account_account,account.account,account.model_account_account,portal.group_portal,1,0,0,0 -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/__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..cb4256fb773 --- /dev/null +++ b/addons/portal_stock/__openerp__.py @@ -0,0 +1,41 @@ +# -*- 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 claim menu and features to your portal if claim and portal are installed. +========================================================================================== + """, + 'author': 'OpenERP SA', + 'depends': ['sale_stock','portal'], + 'data': [ + '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