v 13.0 Third Party 4909
Download for v 13.0 Deploy on Odoo.sh
Required Apps Inventory (stock)
Lines of code 82
Technical Name warehouse_stock_restrictions
LicenseOPL-1
Websitehttp://www.techspawn.com
Also available in version v 8.0 v 9.0 v 10.0 v 11.0 v 12.0 v 14.0
You bought this module and need support? Click here!
Required Apps Inventory (stock)
Lines of code 82
Technical Name warehouse_stock_restrictions
LicenseOPL-1
Websitehttp://www.techspawn.com
Also available in version v 8.0 v 9.0 v 10.0 v 11.0 v 12.0 v 14.0

Warehouse Restriction

Warehouse and Stock Location Restriction on Users




  • After successful installation it will add few fields on User form. Select 'Restrict stock warehouse' option for user you want to add restriction.



  • Go to User -> Preferences -> Default Warehouse Operations.


  • To restrict the user to limited warehouses, admin can add allowed Warehouses under Default Warehouse Operations. This will restric the user to other warehouses.


  • On selecting Restrict Location option, it will add another tab Allowed Stock Locations after Preferences where the admin can add allowed Stock Location for the User.


  • Note : This restrictions are created using rule and access rights, so it will have no effect on the Adminstrator.

Contact & Support

Get Expert Help and assistance related to the new Odoo feature, And All ERP Related solutions at one place. We offer Solutions regardless the size of a business, Contact us through e-mail at sales@techspawn.com And Get Professional help that you want to build your business better.

Support Contact Us
image image image

Warehouse Restriction

  • This module will add Warehouse and Stock Location Restriction on Users

Installation

  • Install the module normally like other modules.

Configuration

  • Add Default Warehouse Opertions and Allowed Stock Locations and you are ready to go.

Note

  • This restrictions are created using rule and access rights, so it will have no effect on the Adminstrator.
Odoo Proprietary License v1.0
This software and associated files (the "Software") may only be used (executed,
modified, executed after modifications) if you have purchased a valid license
from the authors, typically via Odoo Apps, or if you have received a written
agreement from the authors of the Software (see the COPYRIGHT file).
You may develop Odoo modules that use the Software as a library (typically
by depending on it, importing it and using its resources), but without copying
any source code or material from the Software. You may distribute those
modules under the license of your choice, provided that this license is
compatible with the terms of the Odoo Proprietary License (For example:
LGPL, MIT, or proprietary licenses similar to this one).
It is forbidden to publish, distribute, sublicense, or sell copies of the Software
or modified copies of the Software.
The above copyright notice and this permission notice must be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.
causes error on inventory
by
ggeorgiev
on 10/26/20, 12:25 PM



causes error on confirming any RFQ
by
anis
on 9/18/20, 2:24 PM

it causes errors on confirming any RFQ that have plus one article on it  with user admin / setting and normal user with full access to stock

Error:

Odoo Server Error


Traceback (most recent call last):

  File "/usr/lib/python3/dist-packages/odoo/models.py", line 5000, in ensure_one

    _id, = self._ids

ValueError: too many values to unpack (expected 1)


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/usr/lib/python3/dist-packages/odoo/http.py", line 624, in _handle_exception

    return super(JsonRequest, self)._handle_exception(exception)

  File "/usr/lib/python3/dist-packages/odoo/http.py", line 310, in _handle_exception

    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])

  File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 14, in reraise

    raise value

  File "/usr/lib/python3/dist-packages/odoo/http.py", line 669, in dispatch

    result = self._call_function(**self.params)

  File "/usr/lib/python3/dist-packages/odoo/http.py", line 350, in _call_function

    return checked_call(self.db, *args, **kwargs)

  File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 94, in wrapper

    return f(dbname, *args, **kwargs)

  File "/usr/lib/python3/dist-packages/odoo/http.py", line 339, in checked_call

    result = self.endpoint(*a, **kw)

  File "/usr/lib/python3/dist-packages/odoo/http.py", line 915, in __call__

    return self.method(*args, **kw)

  File "/usr/lib/python3/dist-packages/odoo/http.py", line 515, in response_wrap

    response = f(*args, **kw)

  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1326, in call_button

    action = self._call_kw(model, method, args, kwargs)

  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1314, in _call_kw

    return call_kw(request.env[model], method, args, kwargs)

  File "/usr/lib/python3/dist-packages/odoo/api.py", line 387, in call_kw

    result = _call_kw_multi(method, model, args, kwargs)

  File "/usr/lib/python3/dist-packages/odoo/api.py", line 374, in _call_kw_multi

    result = method(recs, *args, **kwargs)

  File "/usr/lib/python3/dist-packages/odoo/addons/purchase/models/purchase.py", line 360, in button_confirm

    order.button_approve()

  File "/usr/lib/python3/dist-packages/odoo/addons/purchase_stock/models/purchase.py", line 89, in button_approve

    self._create_picking()

  File "/usr/lib/python3/dist-packages/odoo/addons/purchase_stock/models/purchase.py", line 220, in _create_picking

    moves = order.order_line._create_stock_moves(picking)

  File "/usr/lib/python3/dist-packages/odoo/addons/purchase_stock/models/purchase.py", line 417, in _create_stock_moves

    return self.env['stock.move'].create(values)

  File "<decorator-gen-130>", line 2, in create

  File "/usr/lib/python3/dist-packages/odoo/api.py", line 336, in _model_create_multi

    return create(self, arg)

  File "/usr/lib/python3/dist-packages/odoo/addons/stock/models/stock_move.py", line 439, in create

    res = super(StockMove, self).create(vals_list)

  File "<decorator-gen-3>", line 2, in create

  File "/usr/lib/python3/dist-packages/odoo/api.py", line 336, in _model_create_multi

    return create(self, arg)

  File "/usr/lib/python3/dist-packages/odoo/models.py", line 3742, in create

    records = self._create(data_list)

  File "/usr/lib/python3/dist-packages/odoo/models.py", line 3895, in _create

    records._validate_fields(name for data in data_list for name in data['stored'])

  File "/usr/lib/python3/dist-packages/odoo/models.py", line 1176, in _validate_fields

    check(self)

  File "/usr/lib/python3/dist-packages/odoo/addons/v13/warehouse_stock_restrictions/stock.py", line 27, in check_user_location_rights

    self.ensure_one()

  File "/usr/lib/python3/dist-packages/odoo/models.py", line 5003, in ensure_one

    raise ValueError("Expected singleton: %s" % self)

ValueError: Expected singleton: stock.move(7, 8)


by
Andy Agus Kurniawan
on 5/15/20, 2:56 AM

hi, that module can be running on odoo 13 community version..?


by
XADO Egypt
on 2/13/21, 9:16 AM

when will you update it to v14 ?


erreur in sale and purchase order
by
anis
on 9/18/20, 7:28 AM

thank for the effort but i have to informe that the rise erreur in sale or purchase order for multiple item, if the rfq contien more than one article it have this erreur

Error:

Odoo Server Error


Traceback (most recent call last):

  File "/usr/lib/python3/dist-packages/odoo/models.py", line 5000, in ensure_one

    _id, = self._ids

ValueError: too many values to unpack (expected 1)


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/usr/lib/python3/dist-packages/odoo/http.py", line 624, in _handle_exception

    return super(JsonRequest, self)._handle_exception(exception)

  File "/usr/lib/python3/dist-packages/odoo/http.py", line 310, in _handle_exception

    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])

  File "/usr/lib/python3/dist-packages/odoo/tools/pycompat.py", line 14, in reraise

    raise value

  File "/usr/lib/python3/dist-packages/odoo/http.py", line 669, in dispatch

    result = self._call_function(**self.params)

  File "/usr/lib/python3/dist-packages/odoo/http.py", line 350, in _call_function

    return checked_call(self.db, *args, **kwargs)

  File "/usr/lib/python3/dist-packages/odoo/service/model.py", line 94, in wrapper

    return f(dbname, *args, **kwargs)

  File "/usr/lib/python3/dist-packages/odoo/http.py", line 339, in checked_call

    result = self.endpoint(*a, **kw)

  File "/usr/lib/python3/dist-packages/odoo/http.py", line 915, in __call__

    return self.method(*args, **kw)

  File "/usr/lib/python3/dist-packages/odoo/http.py", line 515, in response_wrap

    response = f(*args, **kw)

  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1326, in call_button

    action = self._call_kw(model, method, args, kwargs)

  File "/usr/lib/python3/dist-packages/odoo/addons/web/controllers/main.py", line 1314, in _call_kw

    return call_kw(request.env[model], method, args, kwargs)

  File "/usr/lib/python3/dist-packages/odoo/api.py", line 387, in call_kw

    result = _call_kw_multi(method, model, args, kwargs)

  File "/usr/lib/python3/dist-packages/odoo/api.py", line 374, in _call_kw_multi

    result = method(recs, *args, **kwargs)

  File "/usr/lib/python3/dist-packages/odoo/addons/purchase/models/purchase.py", line 360, in button_confirm

    order.button_approve()

  File "/usr/lib/python3/dist-packages/odoo/addons/purchase_stock/models/purchase.py", line 89, in button_approve

    self._create_picking()

  File "/usr/lib/python3/dist-packages/odoo/addons/purchase_stock/models/purchase.py", line 220, in _create_picking

    moves = order.order_line._create_stock_moves(picking)

  File "/usr/lib/python3/dist-packages/odoo/addons/purchase_stock/models/purchase.py", line 417, in _create_stock_moves

    return self.env['stock.move'].create(values)

  File "<decorator-gen-177>", line 2, in create

  File "/usr/lib/python3/dist-packages/odoo/api.py", line 336, in _model_create_multi

    return create(self, arg)

  File "/usr/lib/python3/dist-packages/odoo/addons/stock/models/stock_move.py", line 439, in create

    res = super(StockMove, self).create(vals_list)

  File "<decorator-gen-3>", line 2, in create

  File "/usr/lib/python3/dist-packages/odoo/api.py", line 336, in _model_create_multi

    return create(self, arg)

  File "/usr/lib/python3/dist-packages/odoo/models.py", line 3742, in create

    records = self._create(data_list)

  File "/usr/lib/python3/dist-packages/odoo/models.py", line 3895, in _create

    records._validate_fields(name for data in data_list for name in data['stored'])

  File "/usr/lib/python3/dist-packages/odoo/models.py", line 1176, in _validate_fields

    check(self)

  File "/usr/lib/python3/dist-packages/odoo/addons/v13/warehouse_stock_restrictions/stock.py", line 27, in check_user_location_rights

    self.ensure_one()

  File "/usr/lib/python3/dist-packages/odoo/models.py", line 5003, in ensure_one

    raise ValueError("Expected singleton: %s" % self)

ValueError: Expected singleton: stock.move(286, 287)


this for admin , for non admin user default location and operation dont appear for allocated them to the user , it need to be recreated 

thank u for the effort i hope it will be solved soon


odoo 13 community
by
Andy Agus Kurniawan
on 5/15/20, 2:54 AM

hi, that module can be running on odoo 13 community version..?