diff --git a/README.md b/README.md index 7bb0dcb..8469f6e 100644 --- a/README.md +++ b/README.md @@ -19,3 +19,8 @@ For Support : * Website : www.techspawn.com * Facebook : www.facebook.com/techspawnsolutions/ * Twitter : www.twitter.com/techspawn/ + +Contributors: +============= + +* Fábrica de Software Libre: www.fslibre.com \ No newline at end of file diff --git a/__manifest__.py b/__manifest__.py index 008bf04..a97b9a7 100644 --- a/__manifest__.py +++ b/__manifest__.py @@ -32,13 +32,14 @@ 'website': "http://www.techspawn.com", 'category': 'Warehouse', - 'version': '10.0.0.1', + 'version': '10.0.0.2', 'depends': ['base', 'stock'], 'data': [ 'views/users.xml', - 'security/security.xml', + 'views/stock.xml', + 'security/security.xml', ], 'installable': True, 'application': False, diff --git a/models/stock.py b/models/stock.py index 4ad5404..3a4b586 100644 --- a/models/stock.py +++ b/models/stock.py @@ -20,6 +20,14 @@ class ResUsers(models.Model): 'user_id', 'picking_type_id', string='Default Warehouse Operations') +class StockPickingType(models.Model): + _inherit = 'stock.picking.type' + + allowed_user_ids = fields.Many2many( + 'res.users', 'stock_picking_type_users_rel', + 'picking_type_id', 'user_id', string='Allowed users', ) + + class stock_move(models.Model): _inherit = 'stock.move' diff --git a/security/ir.model.access.csv b/security/ir.model.access.csv deleted file mode 100644 index 55ad673..0000000 --- a/security/ir.model.access.csv +++ /dev/null @@ -1,2 +0,0 @@ -id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_warehouse_stock_locations_warehouse_stock_locations,warehouse_stock_locations.warehouse_stock_locations,model_warehouse_stock_locations_warehouse_stock_locations,,1,0,0,0 \ No newline at end of file diff --git a/security/security.xml b/security/security.xml index 51a049c..92432cd 100644 --- a/security/security.xml +++ b/security/security.xml @@ -4,6 +4,6 @@ Filter Stock Picking Type Allowed - [('id','in', [ p.id for p in user.default_picking_type_ids ])] + ['|', ('allowed_user_ids','=', False), ('id','in', [ p.id for p in user.default_picking_type_ids ])] \ No newline at end of file diff --git a/views/stock.xml b/views/stock.xml new file mode 100644 index 0000000..b393e2d --- /dev/null +++ b/views/stock.xml @@ -0,0 +1,15 @@ + + + + Picking type allowed users form view + stock.picking.type + + + + + + + + + + \ No newline at end of file