Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Generic module to compute the stock quantity available to promise #5
Commit 1: Main module + option to exclude incoming deliveries
The "quantity available to promise" is the quantity of a product that you can commit to deliver to a customer.
Code trick: function field modularity
By default function fields are not very modular (you need to redefine the whole field to override the method). stock_available takes care of this by making the function fields call the pool instead, so that stock_available_immediately and other future implementations need only override the function _product_available.
Changes to stock_available_immediately
The existing module stock_available_immediately by @guewen and @sebastienbeau is turned into the first optional implementation.
Commit 2: option to include products that can be readily manufactured
The module stock_available_mrp takes immediate manufacturing capability into account in the stock quantity available to promise.
Commit 3: option to exclude products already proposed in sale quotations
The module stock_available_sale takes sale quotations into account in the stock quantity available to promise, so that sales persons don't include the same products in 2 quotations.