Skip to Content
Menu
This question has been flagged
1 Reply
1965 Views

how to disable or block negative stock in my sock adjustment in odoo v15


Avatar
Discard
Best Answer

Hello

you can write code in onchange method to check inventory_quantity field value while changeing.

Alternative way is to create automation action as follow:

for rec in records:
if rec.inventory_quantity < 0:
raise UserError("Nagative stock is not allowed")



Thanks & Regards,



CandidRoot Solutions Pvt. Ltd.

Mobile: (+91) 8849036209
Email: info@candidroot.com
Skype: live:candidroot
Web: https://www.candidroot.com
Address: 1229-1230, Iconic Shyamal, Near Shyamal Cross Road, Ahmedabad, Gujarat
Avatar
Discard

Nice solution!
Is it possible to extend this action to disallow transfers of products that leave a negative quantity?

Author

thank you for your solution I did it exactly but it doesn't work when I start manufacturing it generates me the least in stock of unavailable items I would like when I start manufacturing a dumpster with these nomenclature (items) when they are not available in stock that it blocks production

Hi @RicardoGross did you manage to accomplish your extended request? because I have a similar scenario where I'd like ODOO to raise a warning in case any user attempts to move more quantities than in stock in the specific location. It should apply to any transfer.

Hi Mujtabaa, I still don't have the extension solution!

Related Posts Replies Views Activity
1
Nov 24
2589
3
Nov 24
1481
3
Nov 24
262
0
Oct 24
215
0
Aug 24
257