Tiffany Chang (tic) d251496bbf [FIX] stock: do not allow direct deletion of quants
Some users were updating their access rights to allow for direct
deletion of quants. This could lead to the infamous:

"It is not possible to unreserve more products of %s than you have in stock."

error since directly deleting a quant bypasses the flows of correctly
unreserving the amounts you are deleting. Therefore we now restrict
the unlinking to:
- when in sudo mode, since the automatic unlinking of zero quants always
  occurs in sudo mode.
- stock manager when unlink access right = True. Normally we would allow
  any user with the unlink access to do it, but since we are using the
  existing `_apply_inventory` to ensure that reserved qtys of the
  quant are correctly unreserved before the unlinking, only stock
  managers will correctly do this unreservation.

It is expected that some custom code may break due to this restriction,
but if custom code is directly unlinking quants without a sudo or with a
non-stock manager, then the code in these cases probably need to be
fixed anyways since this will cause inconsistent db data and lead to
the error above.

X-original-commit: d1602e7ddefd59cafa1ce0a5522a53c987135858
Part-of: odoo/odoo#115613
2023-03-20 15:31:21 +01:00
…
2015-09-08 17:58:38 +02:00
2023-01-03 13:16:02 +01:00

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%