diff --git a/user_warehouse_restriction/README.rst b/user_warehouse_restriction/README.rst new file mode 100644 index 000000000..32c11934f --- /dev/null +++ b/user_warehouse_restriction/README.rst @@ -0,0 +1,48 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +User Warehouse Restriction +========================== +This module helps you to restrict warehouse and stock location for the users. +So that users can only access the allowed warehouse and locations. + +Configuration +============= +* Enable 'Restrict stock warehouse to users' from inventory configuration settings +* Restrict warehouse and stock location for the users. + +License +------- +Affero General Public License v3.0 (AGPL v3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: (V15) Vishnu P, Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/user_warehouse_restriction/__init__.py b/user_warehouse_restriction/__init__.py new file mode 100644 index 000000000..e567e1521 --- /dev/null +++ b/user_warehouse_restriction/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Vishnu P (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from . import models diff --git a/user_warehouse_restriction/__manifest__.py b/user_warehouse_restriction/__manifest__.py new file mode 100644 index 000000000..3add649ec --- /dev/null +++ b/user_warehouse_restriction/__manifest__.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Vishnu P (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +{ + 'name': "User Warehouse Restriction", + 'version': '15.0.1.0.0', + 'category': 'Warehouse', + 'summary': """Restrict Warehouses and location for users.""", + 'description': """This module helps you to restrict warehouse and stock + location for the specific users. So that users can only access the allowed + warehouse and locations.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['stock_sms','stock'], + 'data': [ + 'security/user_warehouse_restriction_groups.xml', + 'security/user_warehouse_restriction_security.xml', + 'views/stock_location_views.xml', + 'views/res_config_settings_views.xml', + 'views/stock_warehouse_views.xml', + 'views/res_users_views.xml', + ], + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/user_warehouse_restriction/doc/RELEASE_NOTES.md b/user_warehouse_restriction/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..92dedc78f --- /dev/null +++ b/user_warehouse_restriction/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 29.04.2024 +#### Version 15.0.1.0.0 +#### ADD + +- Initial commit for User Warehouse Restriction diff --git a/user_warehouse_restriction/models/__init__.py b/user_warehouse_restriction/models/__init__.py new file mode 100644 index 000000000..b4efb9a68 --- /dev/null +++ b/user_warehouse_restriction/models/__init__.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Vishnu P (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from . import res_config_settings +from . import res_users +from . import stock_location +from . import stock_picking +from . import stock_warehouse diff --git a/user_warehouse_restriction/models/res_config_settings.py b/user_warehouse_restriction/models/res_config_settings.py new file mode 100755 index 000000000..4890ca6d2 --- /dev/null +++ b/user_warehouse_restriction/models/res_config_settings.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Vishnu P (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from odoo import api, fields, models + + +class ResConfigSettings(models.TransientModel): + """Add new fields to configuration settings to Restrict stock warehouse + for users.""" + _inherit = 'res.config.settings' + + group_user_warehouse_restriction = fields.Boolean( + string="Restrict Stock Warehouse", + implied_group='user_warehouse_restriction.' + 'user_warehouse_restriction_group_user', + help="Check if you want to restrict warehouse for users.") + + @api.onchange('group_user_warehouse_restriction') + def _onchange_group_user_warehouse_restriction(self): + """This method is triggered when the 'group_user_warehouse_restriction' + field is changed. if it's true, assigns the current user as the + allowed user of all existing warehouses.""" + warehouses = self.env['stock.warehouse'].search([]) + for warehouse in warehouses: + if self.group_user_warehouse_restriction: + # Assign the current user to each warehouse + warehouse.user_ids = [(6, 0, [self.env.user.id])] + else: + # Clear the allowed users for each warehouse + warehouse.user_ids = [(5, 0, 0)] diff --git a/user_warehouse_restriction/models/res_users.py b/user_warehouse_restriction/models/res_users.py new file mode 100644 index 000000000..91fb3b169 --- /dev/null +++ b/user_warehouse_restriction/models/res_users.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Vishnu P (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from odoo import api, fields, models + + +class ResUsers(models.Model): + """This model adds additional fields to the `res.users` model to restrict + user access to certain locations and warehouses.""" + _inherit = 'res.users' + + allowed_warehouse_ids = fields.Many2many( + comodel_name='stock.warehouse', string='Allowed Warehouse', + help='Allowed Warehouse for user.') + restrict_location = fields.Boolean(string="Restrict Location", + help='Restrict location for the user.') + location_ids = fields.Many2many(comodel_name='stock.location', + string='Restricted Locations', + help='Restricted locations for users.', + domain="[('location_warehouse_id', 'in', allowed_warehouse_ids)]") + check_user = fields.Boolean(string="Check", compute='_compute_check_user', + help="Indicates whether the user has warehouse" + " location restrictions.") + + @api.model + def create(self, vals): + self.clear_caches() + return super(ResUsers, self).create(vals) + + def write(self, vals): + self.clear_caches() + return super(ResUsers, self).write(vals) + + def _compute_check_user(self): + """To determine if the user has warehouse location restrictions. + Sets the check_user field accordingly.""" + restriction_group_id = self.env.ref( + 'user_warehouse_restriction.user_warehouse_restriction_group_user').id + for record in self: + record.check_user = False + if restriction_group_id in record.groups_id.mapped('id'): + record.check_user = True diff --git a/user_warehouse_restriction/models/stock_location.py b/user_warehouse_restriction/models/stock_location.py new file mode 100644 index 000000000..5cf34028d --- /dev/null +++ b/user_warehouse_restriction/models/stock_location.py @@ -0,0 +1,47 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Vishnu P (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from collections import OrderedDict +from odoo import api, fields, models + + +class StockLocation(models.Model): + _inherit = 'stock.location' + + location_warehouse_id = fields.Many2one('stock.warehouse', + compute='_compute_location_warehouse_id', + store=True) + + @api.depends('warehouse_view_ids') + def _compute_location_warehouse_id(self): + """Computes the warehouse location""" + warehouses = self.env['stock.warehouse'].search( + [('view_location_id', 'parent_of', self.ids)]) + view_by_wh = OrderedDict( + (wh.view_location_id.id, wh.id) for wh in warehouses) + self.warehouse_id = False + for loc in self: + path = set( + int(loc_id) for loc_id in loc.parent_path.split('/')[:-1]) + for view_location_id in view_by_wh: + if view_location_id in path: + loc.location_warehouse_id = view_by_wh[view_location_id] + break diff --git a/user_warehouse_restriction/models/stock_picking.py b/user_warehouse_restriction/models/stock_picking.py new file mode 100644 index 000000000..1f5c25659 --- /dev/null +++ b/user_warehouse_restriction/models/stock_picking.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Vishnu P (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import api, models + + +class StockPicking(models.Model): + """Extends stock picking to apply domain restrictions based on user's + assigned warehouses.""" + _inherit = 'stock.picking' + + @api.onchange('location_id', 'location_dest_id') + def _onchange_location_id(self): + """Domain for location_id and location_dest_id.""" + return { + 'domain': {'location_id': [ + ('warehouse_id.user_ids', 'in', self.env.user.id)], + 'location_dest_id': [ + ('warehouse_id.user_ids', 'in', self.env.user.id)]}} diff --git a/user_warehouse_restriction/models/stock_warehouse.py b/user_warehouse_restriction/models/stock_warehouse.py new file mode 100644 index 000000000..358f9d7de --- /dev/null +++ b/user_warehouse_restriction/models/stock_warehouse.py @@ -0,0 +1,65 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author: Vishnu P (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +############################################################################### +from odoo import api, fields, models + + +class StockWarehouse(models.Model): + """Extends the 'stock.warehouse' model to add functionality for restricting + stock location access to specific users within the system.""" + _inherit = "stock.warehouse" + + user_ids = fields.Many2many( + comodel_name='res.users', string='Allowed Users', + domain=lambda self: [ + ('groups_id', 'in', self.env.ref('stock.group_stock_user').id)], + default=lambda self: self.env.user, + help='Allowed users to this Warehouse.') + restrict_location = fields.Boolean( + string='Restrict Stock Location for this Warehouse', + help='Restrict stock location of this warehouse to the selected ' + 'users.') + + @api.onchange('restrict_location', 'user_ids') + def _onchange_restrict_location(self): + """Triggered when the 'restrict_location' or 'user_ids' fields + are modified. It updates the 'restrict_location' field for selected + users when restricting stock location access.""" + for rec in self.user_ids: + if self.restrict_location: + rec._origin.write({'restrict_location': True, + 'allowed_warehouse_ids': [ + (4, self._origin.id)]}) + elif not self.restrict_location: + rec._origin.write({'restrict_location': True, + 'location_ids': False + }) + + def action_open_users_view(self): + """Return user basic form view to give restricted location for users""" + return { + 'type': 'ir.actions.act_window', + 'name': 'Users', + 'view_mode': 'tree,form', + 'res_model': 'res.users', + 'domain': [('id', 'in', [user.id for user in self.user_ids]), + ('groups_id', 'not in', + [self.env.ref('base.group_system').id])]} diff --git a/user_warehouse_restriction/security/user_warehouse_restriction_groups.xml b/user_warehouse_restriction/security/user_warehouse_restriction_groups.xml new file mode 100644 index 000000000..5a19c238d --- /dev/null +++ b/user_warehouse_restriction/security/user_warehouse_restriction_groups.xml @@ -0,0 +1,8 @@ + + + + + Restrict Warehouse for Users + + + diff --git a/user_warehouse_restriction/security/user_warehouse_restriction_security.xml b/user_warehouse_restriction/security/user_warehouse_restriction_security.xml new file mode 100644 index 000000000..f9bb080e1 --- /dev/null +++ b/user_warehouse_restriction/security/user_warehouse_restriction_security.xml @@ -0,0 +1,52 @@ + + + + + Operation Type Restrict on Users + + [('warehouse_id.user_ids','in', user.id)] + + + + + + + + + + Stock Location Restrict on Users + + [('id', 'not in', user.location_ids.ids)] + + + + + + + + + + Warehouse Restrict on Users + + [('user_ids','in', user.id)] + + + + + + + + + + Warehouse Transfers Restrict on Users + + [('picking_type_id.warehouse_id.user_ids','in', user.id)] + + + + + + + + diff --git a/user_warehouse_restriction/static/description/assets/icons/check.png b/user_warehouse_restriction/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/user_warehouse_restriction/static/description/assets/icons/check.png differ diff --git a/user_warehouse_restriction/static/description/assets/icons/chevron.png b/user_warehouse_restriction/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/user_warehouse_restriction/static/description/assets/icons/chevron.png differ diff --git a/user_warehouse_restriction/static/description/assets/icons/cogs.png b/user_warehouse_restriction/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/user_warehouse_restriction/static/description/assets/icons/cogs.png differ diff --git a/user_warehouse_restriction/static/description/assets/icons/consultation.png b/user_warehouse_restriction/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/user_warehouse_restriction/static/description/assets/icons/consultation.png differ diff --git a/user_warehouse_restriction/static/description/assets/icons/ecom-black.png b/user_warehouse_restriction/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/user_warehouse_restriction/static/description/assets/icons/ecom-black.png differ diff --git a/user_warehouse_restriction/static/description/assets/icons/education-black.png b/user_warehouse_restriction/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/user_warehouse_restriction/static/description/assets/icons/education-black.png differ diff --git a/user_warehouse_restriction/static/description/assets/icons/hotel-black.png b/user_warehouse_restriction/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/user_warehouse_restriction/static/description/assets/icons/hotel-black.png differ diff --git a/user_warehouse_restriction/static/description/assets/icons/license.png b/user_warehouse_restriction/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/user_warehouse_restriction/static/description/assets/icons/license.png differ diff --git a/user_warehouse_restriction/static/description/assets/icons/lifebuoy.png b/user_warehouse_restriction/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/user_warehouse_restriction/static/description/assets/icons/lifebuoy.png differ diff --git a/user_warehouse_restriction/static/description/assets/icons/logo.png b/user_warehouse_restriction/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/user_warehouse_restriction/static/description/assets/icons/logo.png differ diff --git a/user_warehouse_restriction/static/description/assets/icons/manufacturing-black.png b/user_warehouse_restriction/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/user_warehouse_restriction/static/description/assets/icons/manufacturing-black.png differ diff --git a/user_warehouse_restriction/static/description/assets/icons/pos-black.png b/user_warehouse_restriction/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/user_warehouse_restriction/static/description/assets/icons/pos-black.png differ diff --git a/user_warehouse_restriction/static/description/assets/icons/puzzle.png b/user_warehouse_restriction/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/user_warehouse_restriction/static/description/assets/icons/puzzle.png differ diff --git a/user_warehouse_restriction/static/description/assets/icons/restaurant-black.png b/user_warehouse_restriction/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/user_warehouse_restriction/static/description/assets/icons/restaurant-black.png differ diff --git a/user_warehouse_restriction/static/description/assets/icons/service-black.png b/user_warehouse_restriction/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/user_warehouse_restriction/static/description/assets/icons/service-black.png differ diff --git a/user_warehouse_restriction/static/description/assets/icons/trading-black.png b/user_warehouse_restriction/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/user_warehouse_restriction/static/description/assets/icons/trading-black.png differ diff --git a/user_warehouse_restriction/static/description/assets/icons/training.png b/user_warehouse_restriction/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/user_warehouse_restriction/static/description/assets/icons/training.png differ diff --git a/user_warehouse_restriction/static/description/assets/icons/update.png b/user_warehouse_restriction/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/user_warehouse_restriction/static/description/assets/icons/update.png differ diff --git a/user_warehouse_restriction/static/description/assets/icons/user.png b/user_warehouse_restriction/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/user_warehouse_restriction/static/description/assets/icons/user.png differ diff --git a/user_warehouse_restriction/static/description/assets/icons/wrench.png b/user_warehouse_restriction/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/user_warehouse_restriction/static/description/assets/icons/wrench.png differ diff --git a/user_warehouse_restriction/static/description/assets/modules/1.png b/user_warehouse_restriction/static/description/assets/modules/1.png new file mode 100644 index 000000000..3932f4062 Binary files /dev/null and b/user_warehouse_restriction/static/description/assets/modules/1.png differ diff --git a/user_warehouse_restriction/static/description/assets/modules/barcode_image.png b/user_warehouse_restriction/static/description/assets/modules/barcode_image.png new file mode 100644 index 000000000..cfb5be33c Binary files /dev/null and b/user_warehouse_restriction/static/description/assets/modules/barcode_image.png differ diff --git a/user_warehouse_restriction/static/description/assets/modules/biometric_image.png b/user_warehouse_restriction/static/description/assets/modules/biometric_image.png new file mode 100644 index 000000000..a0969fcb5 Binary files /dev/null and b/user_warehouse_restriction/static/description/assets/modules/biometric_image.png differ diff --git a/user_warehouse_restriction/static/description/assets/modules/export_image.png b/user_warehouse_restriction/static/description/assets/modules/export_image.png new file mode 100644 index 000000000..492980ad0 Binary files /dev/null and b/user_warehouse_restriction/static/description/assets/modules/export_image.png differ diff --git a/user_warehouse_restriction/static/description/assets/modules/login_image.png b/user_warehouse_restriction/static/description/assets/modules/login_image.png new file mode 100644 index 000000000..4fbe85ac1 Binary files /dev/null and b/user_warehouse_restriction/static/description/assets/modules/login_image.png differ diff --git a/user_warehouse_restriction/static/description/assets/modules/payroll_image.png b/user_warehouse_restriction/static/description/assets/modules/payroll_image.png new file mode 100644 index 000000000..7f2815273 Binary files /dev/null and b/user_warehouse_restriction/static/description/assets/modules/payroll_image.png differ diff --git a/user_warehouse_restriction/static/description/assets/modules/sale_image.png b/user_warehouse_restriction/static/description/assets/modules/sale_image.png new file mode 100644 index 000000000..004c61a9e Binary files /dev/null and b/user_warehouse_restriction/static/description/assets/modules/sale_image.png differ diff --git a/user_warehouse_restriction/static/description/assets/screenshots/1.png b/user_warehouse_restriction/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..35e57366b Binary files /dev/null and b/user_warehouse_restriction/static/description/assets/screenshots/1.png differ diff --git a/user_warehouse_restriction/static/description/assets/screenshots/2.png b/user_warehouse_restriction/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..536a325bc Binary files /dev/null and b/user_warehouse_restriction/static/description/assets/screenshots/2.png differ diff --git a/user_warehouse_restriction/static/description/assets/screenshots/3.png b/user_warehouse_restriction/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..4c3350e14 Binary files /dev/null and b/user_warehouse_restriction/static/description/assets/screenshots/3.png differ diff --git a/user_warehouse_restriction/static/description/assets/screenshots/4.png b/user_warehouse_restriction/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..c897bc578 Binary files /dev/null and b/user_warehouse_restriction/static/description/assets/screenshots/4.png differ diff --git a/user_warehouse_restriction/static/description/assets/screenshots/5.png b/user_warehouse_restriction/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..e594aefdd Binary files /dev/null and b/user_warehouse_restriction/static/description/assets/screenshots/5.png differ diff --git a/user_warehouse_restriction/static/description/assets/screenshots/6.png b/user_warehouse_restriction/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..39dd42105 Binary files /dev/null and b/user_warehouse_restriction/static/description/assets/screenshots/6.png differ diff --git a/user_warehouse_restriction/static/description/assets/screenshots/hero.gif b/user_warehouse_restriction/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..5a5b4bb6f Binary files /dev/null and b/user_warehouse_restriction/static/description/assets/screenshots/hero.gif differ diff --git a/user_warehouse_restriction/static/description/banner.jpg b/user_warehouse_restriction/static/description/banner.jpg new file mode 100644 index 000000000..892bd61f0 Binary files /dev/null and b/user_warehouse_restriction/static/description/banner.jpg differ diff --git a/user_warehouse_restriction/static/description/icon.png b/user_warehouse_restriction/static/description/icon.png new file mode 100644 index 000000000..2f843252d Binary files /dev/null and b/user_warehouse_restriction/static/description/icon.png differ diff --git a/user_warehouse_restriction/static/description/index.html b/user_warehouse_restriction/static/description/index.html new file mode 100644 index 000000000..bd6c68552 --- /dev/null +++ b/user_warehouse_restriction/static/description/index.html @@ -0,0 +1,647 @@ +
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+ +
+
+
+
+ +
+
+
+

+ User Warehouse Restriction

+

+ This Module Restrict Warehouse And Stock Location For Users. +

+ +
+
+ + + + +
+
+

+ Overview +

+
+ +
+

+ This module helps you to Restrict Warehouse And Stock Location For Users.

+ +
+
+ +
+
+

+ Configuration +

+
+ +
+

+ No additional configuration required

+ +
+
+ + +
+
+

+ Features +

+
+ +
+
+ +
+
+

+ Odoo 15 Community & Enterprise Edition Support.

+

+ User Warehouse Restriction in Odoo 15 Community & Enterprise Edition.

+
+
+
+
+ +
+
+

+ Restrict Warehouse for Users. +

+

+ Module allows Users to set Restriction for the warehouse. +

+
+
+
+
+ +
+
+

+ Restrict Location for Users. +

+

+ Users to set Restriction for the Location. +

+
+
+
+ +
+
+

+ Screenshots +

+
+
+

+ Enable the feature from the settings.

+
+ Go to Inventory settings -> Click the Restrict Stock warehouse button followed by the storage location button.
+ +
+ +
+

+ Add the users.

+
+ Add the Users here.
+ +
+
+

+ Restrict From User form page.

+
+ Here we can set the Restricted Warehouse and Location.
+ +
+
+

+ Removed the Location and Warehouse

+
+ As per the User Restriction the Locations are Removed from the Selection.
+ +
+
+

+ No Restriction

+
+ For This User There is no Restriction for the Location.
+ +
+
+

+ No filtration in location

+
+ For This User can Access all the Location.
+ +
+
+ + + +
+
+

Suggested Products

+
+ + +
+
+ + + +
+
+
+

Our Services

+
+
+ +
+
+ +
+
+ Odoo + Customization
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Support
+
+ + +
+
+ +
+
+ Hire + Odoo + Developer
+
+ +
+
+ +
+
+ Odoo + Integration
+
+ +
+
+ +
+
+ Odoo + Migration
+
+ + +
+
+ +
+
+ Odoo + Consultancy
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Licensing Consultancy
+
+
+
+ + + +
+
+
+

Our Industries

+
+
+ +
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+ +
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+ +
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+ +
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+ +
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+ +
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+ +
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+ +
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

+
+
+ +
+
+ + + + + +
+
+
+

Need Help?

+
+
+
+ + +
+ +
+ + +
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ + +
\ No newline at end of file diff --git a/user_warehouse_restriction/views/res_config_settings_views.xml b/user_warehouse_restriction/views/res_config_settings_views.xml new file mode 100755 index 000000000..11788ebef --- /dev/null +++ b/user_warehouse_restriction/views/res_config_settings_views.xml @@ -0,0 +1,30 @@ + + + + + + res.config.settings.view.form.inherit.user.warehouse.restriction + + res.config.settings + + + + +
+
+ +
+ +
+
+
+
+
+
+
diff --git a/user_warehouse_restriction/views/res_users_views.xml b/user_warehouse_restriction/views/res_users_views.xml new file mode 100644 index 000000000..10a04b8c1 --- /dev/null +++ b/user_warehouse_restriction/views/res_users_views.xml @@ -0,0 +1,40 @@ + + + + + res.users.view.form.inherit.user.warehouse.restriction + + res.users + extension + + + + + + + + + + + + + + + + res.users.view.form.user.warehouse.restriction + + res.users + + + + + + + + + + + + + diff --git a/user_warehouse_restriction/views/stock_location_views.xml b/user_warehouse_restriction/views/stock_location_views.xml new file mode 100644 index 000000000..f732325ed --- /dev/null +++ b/user_warehouse_restriction/views/stock_location_views.xml @@ -0,0 +1,15 @@ + + + + + stock.location.view.form.inherit.user.warehouse.restriction + stock.location + + + + + + + + + diff --git a/user_warehouse_restriction/views/stock_warehouse_views.xml b/user_warehouse_restriction/views/stock_warehouse_views.xml new file mode 100644 index 000000000..8d8944eb8 --- /dev/null +++ b/user_warehouse_restriction/views/stock_warehouse_views.xml @@ -0,0 +1,41 @@ + + + + + + stock.warehouse.view.form.inherit.user.warehouse.restriction + + stock.warehouse + + + + + + stock.group_adv_location,stock.group_stock_multi_warehouses,user_warehouse_restriction.user_warehouse_restriction_group_user + + + + + stock.group_adv_location,stock.group_stock_multi_warehouses + + + + + + + + +