Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

5

How to prevent selling a product in negative (quantity below zero)?

By
Anas Taji
on 3/1/13, 3:54 PM 6,240 views

While filling a new line inside sales order, a warning showed up to warn the user about the quantity if it is going below zero (Stackable Product, Make to Stock), but this will not prevent the user from confirming the sale order and continue the process.

How can I prevent the user from confirming a sale order in this case?

Thanks..%

3

Guewen Baconnier - Software Developer, Camptocamp

--Guewen Baconnier - Software Developer, Camptocamp--
2658
| 6 7 8
Lausanne, Switzerland
--Guewen Baconnier - Software Developer, Camptocamp--

Guewen works at Camptocamp as an Odoo developer since 2010. He is the lead developer of the Odoo Connector framework and the Magento Connector. He is a delegate member of the OCA, a committer and an active contributor to the OCA projects.

 

Guewen Baconnier - Software Developer, Camptocamp
On 3/25/13, 9:50 AM

You should have a look on the module sale_exceptions: http://bazaar.launchpad.net/~extra-addons-commiter/e-commerce-addons/7.0/files/head:/sale_exceptions/

It allows to create rules on sales orders which blocks their confirmation when they are not fulfilled (a sale manager can still bypass the blocking).

There is actually a rule in the module which blocks the sale order when the virtual quantity of a product in a sale order line goes below zero. The rule is deactivated by default but you can reactivate it.

You can also create new rules if this one does not exactly fit your needs.

This one solved the problem, also allowing extra features. Thanks..%

Smart Way LLC, Anas Taji
on 3/26/13, 9:49 AM
0
arif
On 3/25/13, 8:25 AM

I think, currently no modules are available to prevent sale if item has enough stock. So you can go for a new custom module to get this feature.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 3/1/13, 3:54 PM
Seen: 6240 times
Last updated: 3/16/15, 8:10 AM