diff --git a/stock_inventory_preparation_filters/__openerp__.py b/stock_inventory_preparation_filters/__openerp__.py index ce2c077c1..deaed665b 100644 --- a/stock_inventory_preparation_filters/__openerp__.py +++ b/stock_inventory_preparation_filters/__openerp__.py @@ -44,6 +44,7 @@ with product code and quantity """, "data": [ "views/stock_inventory_view.xml", + "security/ir.model.access.csv", ], "installable": True, "auto_install": False, diff --git a/stock_inventory_preparation_filters/models/stock_inventory.py b/stock_inventory_preparation_filters/models/stock_inventory.py index 2ede73184..0812a7220 100644 --- a/stock_inventory_preparation_filters/models/stock_inventory.py +++ b/stock_inventory_preparation_filters/models/stock_inventory.py @@ -49,15 +49,13 @@ class StockInventory(orm.Model): _inherit = 'stock.inventory' def _get_available_filters(self, cr, uid, context=None): - """ - This function will return the list of filter allowed according to - the options checked in 'Settings\Warehouse'. + """This function will return the list of filter allowed according to + the options checked in 'Settings\Warehouse'. - :rtype: list of tuple + :return: list of tuple """ - res_filter = super(StockInventory, - self)._get_available_filters(cr, uid, - context=context) + res_filter = super(StockInventory, self)._get_available_filters( + cr, uid, context=context) res_filter.append(('categories', _('Selected Categories'))) res_filter.append(('products', _('Selected Products'))) for filter in res_filter: diff --git a/stock_inventory_preparation_filters/security/ir.model.access.csv b/stock_inventory_preparation_filters/security/ir.model.access.csv new file mode 100644 index 000000000..723cb2057 --- /dev/null +++ b/stock_inventory_preparation_filters/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_stock_inventory_line_empty_user,access_stock_inventory_line_empty_user,model_stock_inventory_line_empty,stock.group_stock_user,1,0,0,0 +access_stock_inventory_line_empty_manager,access_stock_inventory_line_empty_manager,model_stock_inventory_line_empty,stock.group_stock_manager,1,1,1,1