跳至内容
Odoo 菜单
  • 登录
  • 免费试用
  • 应用程序
    财务
    • 会计
    • 发票
    • 费用
    • 电子表格 (BI)
    • 文档
    • 电子签名
    销售
    • 客户关系管理
    • 销售
    • POS 销售点管理-零售
    • POS 销售点管理 - 餐厅
    • 订阅
    • 租赁
    网站
    • 网站设计
    • 电子商务
    • 博客
    • 论坛
    • 在线客服
    • 在线学习
    供应链
    • 库存
    • 制造
    • 产品生命周期
    • 采购
    • 维护保养
    • 品控
    人力资源
    • 员工
    • 招聘
    • 休假
    • 评价
    • 内部推荐
    • 车队
    营销
    • 社媒营销
    • 电邮营销
    • 短信营销
    • 近期活动
    • 营销自动化
    • 网上调查
    服务
    • 项目管理
    • 工时单
    • 现场服务
    • 服务台
    • 排期
    • 预约
    生产力
    • 讨论
    • 批核
    • IoT物联网
    • VoIP
    • 知识库
    • WhatsApp
    第三方应用软件 Odoo 定制 Odoo云端平台
  • 行业
    零售
    • 书店
    • 服装店
    • 家具店
    • 食品杂货店
    • 五金店
    • 玩具店
    餐饮与酒店服务
    • 酒吧及酒馆
    • 餐厅
    • 快餐
    • 民宿
    • 饮品分销商
    • 酒店
    房地产
    • 房地产代理
    • 建筑师事务所
    • 建造业
    • 地产管理
    • 园艺
    • 业主协会
    咨询
    • 会计师事务所
    • Odoo合作伙伴
    • 市场推广公司
    • 律师事务所
    • 人才招聘
    • 审核 & 认证
    制造
    • 纺织
    • 金属
    • 家具
    • 食品
    • 啤酒厂
    • 企业礼品
    保健与健身
    • 体育俱乐部
    • 眼镜店
    • 健身中心
    • 健康从业者
    • 药房
    • 发型屋
    商贸服务
    • 维修人员
    • IT 硬件及支持
    • 太阳能系统
    • 鞋匠
    • 清洁服务
    • 暖通空调服务
    其他
    • 非营利组织
    • 环境机构
    • 广告牌租赁
    • 摄影服务
    • 自行车租赁
    • 软件经销商
    浏览所有行业
  • 社区
    学习
    • 教学视频
    • 文档
    • 认证
    • 培训
    • 博客
    • 播客
    赋能教育
    • 教育计划
    • Scale Up! 商业游戏
    • 参观Odoo
    获取软件
    • 下载
    • 版本对比
    • 发布
    合作
    • Github
    • 论坛
    • 近期活动
    • 翻译
    • 成为合作伙伴
    • 合作伙伴服务
    • 注册您的会计事务所
    获取服务
    • 寻找合作伙伴
    • 查找会计服务
    • 预约顾问咨询
    • 安装及推行服务
    • 客户参考
    • 支持
    • 升级
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    获取演示
  • 定价
  • 技术支持

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • 客户关系管理
  • e-Commerce
  • 会计
  • 库存
  • PoS
  • 项目
  • MRP
All apps
只限注册用戶才可与社群互动。
所有帖文 人 徽章
标签 (查看所有)
odoo accounting v14 pos v15
关于此论坛区
只限注册用戶才可与社群互动。
所有帖文 人 徽章
标签 (查看所有)
odoo accounting v14 pos v15
关于此论坛区
帮助

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

订阅

此帖文有活动时,接收通知

此问题已终结
18 回复
75439 查看
形象
Rodrigo

I am getting this error when trying to process or cancel a manufacturing order. "It is not possible to unreserve more products of Pimenton than you have in stock." I have tried to add more product using the "Update quanty on hand" button, but it still gives me the error even though there is plenty of product in stock. 

This is my setup:

- Odoo 11.0-20180818 (Community Edition)
-  Apps installed: POS, purchases, manufacturing, inventory


14
形象
丢弃
Ray Carnes (ray)

Wow. Thanks a lot! Worked like a charm

Ray Carnes (ray)

Thanks for the solution, worked like a charm. 

Ray Carnes (ray)

Its excellent working fine and issue has been solved.... just add access right as mentioned above..

Thanks a lot

Mohamed ALnawasany

is it workable for v12

David López


Hi.

It also worked for me in an Enterprise version, thanks so much @Julia van orsouw for sharing!! 


Greetings from Spain.

WANGXINGUANG

Hello

I got anothor error when i do in step 11action/fix "fix unreserved qty",so odoo sent me a message " You are not allowed to modify 'Quants' (stock.quant) records.
No group currently allows this operation.
Contact your administrator to request access if necessary."

I don't know that reason about odoo version? because my odoo version is 14

Maaldhowr Solutions

That was really perfect as it immediately solved my problem. 

Lars Aam

The never ending story. V16. Manufacturing. MTO between semi finished product and top product. Operator made mistakes on confirm consumption on orders. Logistic responsible created extra transaction to the manufacturing order to correct this, but the consumed there lot numbers that was reserved to a new order. Reservations was not updated and the new order was blocked.

Solution: Update quant with qty on hand with the standard transaction for inventory. Then it was possible to delete the stock move line from the manufacturing order and the reservation was also deleted. 7 quants was involved.

Since this was MTO process, we also cancelled the manufacturing order and created a new independent.

Solved. But used about 6 hours to find the solution. Thanks to everybody that over the years has contributed on this tread.

OdooBot

 Bedankt voor je mailtje. De rest van deze week ben ik vrij en zal ik dus niet reageren. Ik probeer je bericht komende maandag weer op te pakken. Bedankt voor het geduld en tot snel!

 

 

 

形象
Hamza YAYA
最佳答案

In Odoo v15 just run the server Actions Fix unreserved qty to solve the issue


0
形象
丢弃
Ricardo Gross

already in v14 there was this possibility, however this action is only available for users with higher access rights and the other users continue to be faced with this inconsistent error, because with products in stock this should not happen.

形象
Julia van orsouw
最佳答案

i had a similar problem, Odoo send me this fix:

ARM created a fix for this. In order to implement it you need to follow these steps: 

1.debug mode

2.technical/server actions

3.create

4.action name: e.g. fix unreserved qty

5.model: ir.actions.server

6.action to do: "execute python code"

7.copy/paste the fix underneath the pre-existing code

8."save" 

9."create contextual action"

10.refresh page

11.action/fix "fix unreserved qty"

12.wait for it to load 

13."remove contextual action"

14.action/delete

______


It happens because the reserved quantity in your inventory does not reflect the one on your pickings. It's probably due to a small configuration change while some pickings where open. 

An easy way to remove it is to create a server action that executes this code https://gist.github.com/amoyaux/20d50f3368ef2f552071f718dc65cad4

It should repair all the inconsistencies in your data.


23
形象
丢弃
Christian Meyer

This leads in my case to a access error:

Odoo Server Error - Access Error

Sorry, you are not allowed to modify this document. Please contact your system administrator if you think this is an error.

(Document model: stock.quant)

Where can I set the relevant rights? Thanks!

Rodrigo
编写者

Thank you so much... it worked perfect!!. I was looking so long for an answer... I really appreciate your help.

Julia van orsouw

@christian Meyer: have you tried doing this as admin? Otherwise, try upgrading your access rights for model 'stock.quant' in the access rights menu (settings - technical - access controls list)

Emil Dela Cruz

Thank you for this solution. I just encountered this now and 1 search in the forum and this immediately showed up.

Jacob Grundy

This answer worked for me also, it took quite a long time to load though.

I also had to adjust permissions in 'Access rights' as @julia van orsouw suggested above before it would work. I enabled write, create and delete access to stock.quant manager and then changed it back to default after cancelling the record with the issue

Ertuğrul Güreş

Thank you so much...

Fazal Haleem

Worked on v11 Enterprise

Andres Ramirez

It worked for me, thanks.

Tim Drinkwater

Has anyone had any luck with this method and 16.0?

Tim Drinkwater

Was having this same issue. It seems this fix doesn't work in 16. I contacted support and they indicated it was a know issue and corrected it. I asked about a user option to fix when/if it reoccurs. They indicated that there isn't one and to contact support.

形象
Julia van orsouw
最佳答案

Here is the code for the server action


# Available variables:

#  - env: Odoo Environment on which the action is triggered

#  - model: Odoo Model of the record on which the action is triggered; is a void recordset

#  - record: record on which the action is triggered; may be void

#  - records: recordset of all records on which the action is triggered in multi-mode; may be void

#  - time, datetime, dateutil, timezone: useful Python libraries

#  - log: log(message, level='info'): logging function to record debug information in ir.logging table

#  - Warning: Warning Exception to use with raise

# To return an action, assign: action = {...}



# Available variables:

#  - env: Odoo Environment on which the action is triggered

#  - model: Odoo Model of the record on which the action is triggered; is a void recordset

#  - record: record on which the action is triggered; may be void

#  - records: recordset of all records on which the action is triggered in multi-mode; may be void

#  - time, datetime, dateutil, timezone: useful Python libraries

#  - log: log(message, level='info'): logging function to record debug information in ir.logging table

#  - Warning: Warning Exception to use with raise

# To return an action, assign: action = {...}


quants = env["stock.quant"].search([])

move_line_ids = []

warning = ""

for quant in quants:

    move_lines = env["stock.move.line"].search(

        [

            ("product_id", "=", quant.product_id.id),

            ("location_id", "=", quant.location_id.id),

            ("lot_id", "=", quant.lot_id.id),

            ("package_id", "=", quant.package_id.id),

            ("owner_id", "=", quant.owner_id.id),

            ("product_qty", "!=", 0),

        ]

    )

    move_line_ids += move_lines.ids

    reserved_on_move_lines = sum(move_lines.mapped("product_qty"))

    move_line_str = str.join(

        ", ", [str(move_line_id) for move_line_id in move_lines.ids]

    )


    if quant.location_id.should_bypass_reservation():

        # If a quant is in a location that should bypass the reservation, its `reserved_quantity` field

        # should be 0.

        if quant.reserved_quantity != 0:

            quant.write({"reserved_quantity": 0})

    else:

        # If a quant is in a reservable location, its `reserved_quantity` should be exactly the sum

        # of the `product_qty` of all the partially_available / assigned move lines with the same

        # characteristics.

        if quant.reserved_quantity == 0:

            if move_lines:

                move_lines.with_context(bypass_reservation_update=True).write(

                    {"product_uom_qty": 0}

                )

        elif quant.reserved_quantity < 0:

            quant.write({"reserved_quantity": 0})

            if move_lines:

                move_lines.with_context(bypass_reservation_update=True).write(

                    {"product_uom_qty": 0}

                )

        else:

            if reserved_on_move_lines != quant.reserved_quantity:

                move_lines.with_context(bypass_reservation_update=True).write(

                    {"product_uom_qty": 0}

                )

                quant.write({"reserved_quantity": 0})

            else:

                if any(move_line.product_qty < 0 for move_line in move_lines):

                    move_lines.with_context(bypass_reservation_update=True).write(

                        {"product_uom_qty": 0}

                    )

                    quant.write({"reserved_quantity": 0})


move_lines = env["stock.move.line"].search(

    [

        ("product_id.type", "=", "product"),

        ("product_qty", "!=", 0),

        ("id", "not in", move_line_ids),

    ]

)


move_lines_to_unreserve = []


for move_line in move_lines:

    if not move_line.location_id.should_bypass_reservation():

        move_lines_to_unreserve.append(move_line.id)


if len(move_lines_to_unreserve) > 1:

    env.cr.execute(

        """ 

            UPDATE stock_move_line SET product_uom_qty = 0, product_qty = 0 WHERE id in %s ;

        """

        % (tuple(move_lines_to_unreserve),)

    )

elif len(move_lines_to_unreserve) == 1:

    env.cr.execute(

        """ 

        UPDATE stock_move_line SET product_uom_qty = 0, product_qty = 0 WHERE id = %s ;

        """

        % (move_lines_to_unreserve[0])

    )


5
形象
丢弃
christian muland

thanks, it work for me also

osama khalid

perfect,worked for me too on v13 enterprise.

Alberto Pacheco Islas

Thanks! Worked for me on v14 enterprise

Lars Aam

Thnak you for the code. Worked perfect. I hope this error is gone in V14.

jbarnhart@minespress.com

This server action has caused nothing but misery at our company. Our Pick/Pack/Out is all broken, our customers are upset, our wives are filing for divorce, our pickup trucks have broken down, and our dogs ran off.

We tried unreserving everything and running the scheduler and it seems to fix things, but we keep finding bizarre anomalies in that area. Our Odoo business analyst that is on site with us this weeks says that this action should not be run. It was removed from github.

Daniel G

Thanks! Worked fine for me in V12

Mir Muhammad Muzammil

This code is for over all stock quant unreserve. If i only want to unreserve a specific product? what would be added in this code?

Roberto Zanardo

It happens also on Odoo 16: the script needs only to be edited replacing product_qty with reserved_qty and product_uom_qty with reserved_uom_qty.

形象
ABDOU NASSER
最佳答案

This pull request fixes the issue

https://github.com/odoo/odoo/pull/81127/files#diff-4424c1629e21b466bb7af6ab0cb3a674d1bf3e75d93e7e76cf77870dc5bcc853

2
形象
丢弃
Hamza YAYA

the link is dead, update your link to: https://github.com/odoo/odoo/pull/81127/files

Lars Aam

Now the issue also arrised in V16. The fix from V14 does not work.

Tim Drinkwater

Lars, did you find a solution? I am also having this issue on 16.0.

Lars Aam

Tim
Did not work in V16. Experienced the issue only one time. But the transfer related was created in V14. and then the error message came after upgrade to V16.
I ended up with cancel the transfer, empty the stock, archive the product, create a new product, enter the stock and create a new transfer.

形象
Ifredo Baas
最佳答案

I was delighted to find a solution for the reservation issue. Some of our MO's are stuck. Unable to cancel or finish since one or more of the components cannot be "unreserved". We recently upgraded from version 7 to version 12.

Unfortunately running the proposed server action on V12 enterprise (odoo.sh) did not resolve our problem.

Odoo Enterprise support did identify the cause of the problem in our case. 

The Decimal Accuracy/Product Unit of Measure the number of digits was set to 3, while the rounding precision of Unit of Measure (UOM) "kg" was 0.000001

[In general:

If Decimal Accuracy is 3 digits, UOMs should have rounding precision 0.01000 , 0.00100 but not 0.00010 or 0.00001 

If Decimal Accuracy is 2 digits, your UOMs should have rounding precision 0.01000 but not 0.00100, 0.00010 or 0.00001] 

Adjusting the rounding precision took care of some stuck MO's but not all of them. Support did correct historic transactions and all looks fine now.

So kudos to Odoo support for this one. Hope it may help someone else down the road.


2
形象
丢弃
Septia Devi Cahyaningtias

Hi,

after you change the rounding precision in the UoM, did the warning "It is not possible to unreserve more products of ... than you have in stock." not happen again?

形象
Niyas Raphy (Walnut Software Solutions)
最佳答案

Hi,

Enable debug mode and navigate to server action menu under settings and see if there is a server action named:  Correct inconsistencies for reservation

If found, click on Run button, which will solve the issue, if server action is not found, pull the latest source code of corresponding odoo version and upgrade the stock module.


More info:  https://github.com/odoo/odoo/commit/e0e63be484b0ebddc7d498a4a13b2ba7a7f1a1f4#diff-c0d27a4adc8bbd305125f4e2729e30fe444fdd4e5ca0f96f2dd7f1fab19fe80eR17


Thanks

0
形象
丢弃
形象
Ghulam Murtaza
最佳答案

Please anyone give me solution i am facing problem when i validate delivery order it shows error

It is not possible to unreserve more products of [VG1560080012] SPIN-ON FUEL FINE FILTER than you have in stock.
Does not validate stock in odoo 11 community

0
形象
丢弃
形象
ABDIRAZAQ MOHAMED BAKRI
最佳答案

Hi, Julia

i did all your steps, but i did n't understand in step 9

9."create contextual action"
please where i can create this step?

0
形象
丢弃
Asad Asif

Hello,

After creating the action and saving you can find this on top left of your screen.

形象
andresgarciacastilla@gmail.com
最佳答案

Hi,

This code indeed solves the inconsistency in my database and let's my client continue workign. 

However, it keeps happenning again and again. There are not any "configuration changes" in between the failures. 

Do you have any hints on why could this be happenning?

Thanks

0
形象
丢弃
Julia van orsouw

Hi,

If you have EE version I'd advise you to contact Odoo for support to find the cause of this. Else, it's advised to check for discrepancies in stock.quant / stock moves / product moves. I'm not a developer, but I think if this data is not aligned, the error may occur. it could even be a small change like a different unit of measure on a product. Last thing I can think of to check: if you have a scheduled action for the stock scheduler, does it run simultaneously to another process and does that interfere with one another?

Good luck!

Julia van orsouw

I had an issue myself that didn't want to be fixed with the server action. It was caused by planning and processing a manufacturing order + work order eventhough there wasn't enough stock available/reserved for one of the raw material. the MO changed the reserved quantity to it's needs, but the stock.quant reserved quantity didn't change.

Maybe you're also suffering from planning mO's eventhough they don't have enough stock reserved? We've solved it by manually changing the reserved quantity directly in the database.

形象
Riddhi
最佳答案

 

Hello  @Julia van orsouw
I have face same issue, I tried your code but it solved in only 1 time, Later I faced same issue, I was follow same process as per your comment but it's not working.
Can you please help me out.
I will really help for me.
Thanks in advance

0
形象
丢弃
Julia van orsouw

Hello Riddhi, it didn't fix the issue or did you get an error the second time you tried?

形象
Angela Pastor (apt)
最佳答案

V15 FIX: I researched a fix using the code below, and Odoo internal informed me that since v11 (currently we're v15) this code fix sometimes works. Clicking 'update this app' from the Apps list also sometimes works. Your best bet is to submit a ticket to get this issue resolved. 

0
形象
丢弃
Paul

I'm on V15 community (no access to support) and have tried both solutions to no avail. Do you have any other tips/tricks?

形象
Paolo Disetti
最佳答案

Sorry,

I got until p.to  6.action to do: "execute python code"
and I got this in Phyton code

# Available variables:

#  - env: Odoo Environment on which the action is triggered

#  - model: Odoo Model of the record on which the action is triggered; is a void recordset

#  - record: record on which the action is triggered; may be void

#  - records: recordset of all records on which the action is triggered in multi-mode; may be void

#  - time, datetime, dateutil, timezone: useful Python libraries

#  - log: log(message, level='info'): logging function to record debug information in ir.logging table

#  - Warning: Warning Exception to use with raise

# To return an action, assign: action = {...}

About 7. copy/paste the fix underneath the pre-existing code
I have to copy the code that I find here https://gist.github.com/amoyaux/20d50f3368ef2f552071f718dc65cad4

I don't understand this part here, what I have to do? 

Thank you for help

0
形象
丢弃
Julia van orsouw

this is the default code help Odoo provides. You past the code you cn find in one of my comments below or over the default code and then you can continue.

形象
dion arya pamungkas
最佳答案

https://gist.github.com/amoyaux/20d50f3368ef2f552071f718dc65cad4
page not found,

https://gist.github.com/amoyaux/20d50f3368ef2f552071f718dc65cad4
this too, page not found

0
形象
丢弃
Malia

me 2

Julia van orsouw

I've posted the code in a comment in this forum-post

形象
anton@mealhero.me
最佳答案

the python code linked in this answer disappeared from the Github account. What to do now?

0
形象
丢弃
Malia

me 2

Julia van orsouw

I've posted the code in a comment in this forum-post

jbarnhart@minespress.com

You should think that it disappeared for a good reason and not try to find it.

形象
Jan B. Magnussen
最佳答案

Hello

I did not get the steps

10.refresh page    (means simply reloading ??)

11.action/fix "fix unreserved qty"   (my action button on top has only delete or duplicate?)

thanks for help

Jan


ps. fixed my error! and fixed the Odoo error !!!   Great thanks a lot!!!

0
形象
丢弃
Terje Tõnutare

Hi Jan,

How did you find or add the fix to action dropdown?

Jan B. Magnussen

Hi Terje

Not sure anymore :( but have look under "server actions"

there ist a "run" buttom" for "Execute Python Code"

形象
Nicu Constantin
最佳答案

The way i did is in the fallowing video  and it worked .. 

you will endup having a component not consumed, but you can at least mark as done the MO
https://screencast-o-matic.com/watch/c3jZlDVTONK

0
形象
丢弃
形象
JRM Business Systems Solutions, LLC
最佳答案

On version 14 and receiving the same issue. I can make this happen almost at will by continuing to issue product to a manufacturing order once it is "In-Process". Sometimes the above works, other times it does not. This is a BIG issue in that it is important for manufacturing to be able to issue additional product to the MO after the MO has began to be processed.


0
形象
丢弃
Angela Pastor (apt)

See my post above- for v11 onwards, submit a ticket to have this permanently fixes. Thanks!

形象
Alex Barilo
最佳答案

I'm on V 14 community and the code provided is good as long as it works. At the beginning it took 5 minutes to run it, now it takes 40-60 minutes and quite often throws an error making it almost impossible to use. In our case we get this "unreserved" error when trying to validate the sale order delivery. The work around I found is to go to database and increase stock_quant.reserved_quantity to the quantity slightly higher than quantity reserved in that specific sale order delivery for a specified lot number of a product that produces the error (we use lots). Not sure if this lot is also reserved for other sale orders and that should be also taken into account.

Just wondering if that issue was ever resolved in the latest V14 versions?

0
形象
丢弃
Lars Aam

To find if the lot is reserved to other outbound deliveries. Go to Delivery orders. Select statuses: Draft, Waiting, Ready. Search for product. Then check these deliveries if they are reserved. In case you find reservations - unreserve all. The go to the delivery you want to process and press Check Availability. Should solve the problem most of the time.

Alex Barilo

Thank Lars. It does work!

喜欢讨论吗?不要只阅读,加入进来!

立即创建账户,享受专属功能,与我们的精彩社区互动!

注册
社区
  • 教学视频
  • 文档
  • 论坛
开源
  • 下载
  • Github
  • Runbot
  • 翻译
服务
  • Odoo.sh 托管
  • 支持
  • 升级
  • 自定义开发服务
  • 教育
  • 查找会计服务
  • 寻找合作伙伴
  • 成为合作伙伴
关于我们
  • 我们的公司
  • 品牌资产
  • 联系我们
  • 招聘
  • 近期活动
  • 播客
  • 博客
  • 客户
  • 法律 • 隐私
  • 安全
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo致力于为企业管理提供高效智能的开源解决方案,是全球业内高速成长的软件服务商之一,逾七百五十万用户选择Odoo进行数字化升级。通过一系列全业务链覆盖、高度集成、简单易用的商业应用,助力企业实现信息化改革、降本增效并释放公司增长潜力。

Odoo独特的价值在于是一款非常容易使用又完全集成的应用。

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now