Browse Source

Apr 24 [UPDT] : Updated 'user_warehouse_restriction'

pull/317/head
AjmalCybro 1 year ago
parent
commit
c9b5f244da
  1. 2
      user_warehouse_restriction/__manifest__.py
  2. 5
      user_warehouse_restriction/doc/RELEASE_NOTES.md
  3. 3
      user_warehouse_restriction/models/stock_picking.py

2
user_warehouse_restriction/__manifest__.py

@ -21,7 +21,7 @@
###############################################################################
{
'name': "User Warehouse Restriction",
'version': '17.0.1.0.0',
'version': '17.0.2.0.0',
'category': 'Warehouse',
'summary': """Restrict Warehouses and location for users.""",
'description': """This module helps you to restrict warehouse and stock

5
user_warehouse_restriction/doc/RELEASE_NOTES.md

@ -5,3 +5,8 @@
#### ADD
- Initial commit for User Warehouse Restriction
#### 23.04.2024
#### Version 17.0.2.0.0
#### UPDT
- Added Condition for stock picking

3
user_warehouse_restriction/models/stock_picking.py

@ -30,7 +30,8 @@ class StockPicking(models.Model):
@api.onchange('location_id', 'location_dest_id')
def _onchange_location_id(self):
"""Domain for location_id and location_dest_id."""
return {
if self.env['ir.config_parameter'].sudo().get_param('user_warehouse_restriction.group_user_warehouse_restriction'):
return {
'domain': {'location_id': [
('warehouse_id.user_ids', 'in', self.env.user.id)],
'location_dest_id': [

Loading…
Cancel
Save