跳至内容
菜单
此问题已终结
4 回复
3558 查看

Hi Friends!

Can anybody help me? I am unable to find the option to prevent negative stock

形象
丢弃
最佳答案
We don't recommend this.
Allowing negative inventory (with good monitoring) reveals problems that need fixing—like mismatched transactions, theft, or process lags. If you block users, some issues may just get hidden instead of addressed.

If negative inventory is disallowed, users may:

  • Start inflating inventory with fake Receipts
  • Delay validating transfers in Odoo
  • Create unnecessary inventory adjustments
  • Adjust transfers to the quantity available but ship the original quantity requested
  • Might ship or transact using similar or incorrect SKUs
  • Give up on Odoo and use manual or shadow systems

Each of these makes reconciliation even harder and introduces audit/compliance risks.

Your Users are smart, empower them with good tools and get out of their way. Train them on what to do when inventory goes negative and create robust processes to resolve the issues it uncovers.


This is not a complete solution but a prototype. Work with your Odoo Digital Advisor or Odoo Partner if you don't have the skills to create this yourself and to ensure it does not need modifications to work in your database.


1) In Developer Mode, visit Settings --> Technical --> Automation --> Automation Rules

2) Create an Automation Rule like this:


3) Add an Action of type Execute Code like this:

accuracy = env["decimal.precision"].precision_get("Product Unit of Measure")
for record in records:
    diff = round(record.quantity, accuracy)
    if (diff < 0 and record.product_id.is_storable and
            record.location_id.usage in ["internal", "transit"]):
        raise UserError(f'You need {-diff} more {record.product_id.name}(s) to complete this Transfer!')


You will then see an blocking message like this:


Be ready to ARCHIVE this Automation Rule if it blocks Users from doing things they need to do. 




形象
丢弃
最佳答案

Hi,


Please try using the following free module to restrict negative stock.

https://apps.odoo.com/apps/modules/18.0/sale_stock_restrict

https://apps.odoo.com/apps/modules/17.0/pos_restrict_product_stock


Hope it helps

形象
丢弃
最佳答案

I recommend below app:


https://apps.odoo.com/apps/modules/18.0/nr_prevent_negative_stock_pos

形象
丢弃
最佳答案

Hello Hemal Kamdar,

By default, Odoo allows negative stock. The advantage of negative stock is that, if some stock levels are wrong in the ERP, you will not be blocked when validating the picking for a customer… so you will still be able to ship the products on time (it’s an example !). The problem is that, after you forced the stock level to negative, you are supposed to fix the stock level later via an inventory ; but this action is often forgotten by users, so you end up with negative stock levels in your ERP and it can stay like this forever (or at least until the next full inventory).


https://apps.odoo.com/apps/modules/18.0/stock_no_negative

Stock Disallow Negative Module:

  • The OCA (Odoo Community Association) provides a module called stock_no_negative that offers more granular control over negative stock.
    • You can download the module from the OCA GitHub repository.  
    • This module allows you to block stock operations that would lead to negative stock levels, providing more precise control and preventing accidental negative stock.
       

Thanks & Regards,

CandidRoot Solutions Pvt. Ltd.

Mobile: (+91) 8849036209

Email: info@candidroot.com

形象
丢弃
相关帖文 回复 查看 活动
0
7月 25
64
2
7月 23
4076
4
5月 24
4160
1
10月 22
755
0
1月 21
1921