From 497068f5f5f1d65fdd4a6e90a787eba37b4e3232 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lionel=20Sausin=20=28Num=C3=A9rigraphe=29?= Date: Fri, 28 Nov 2014 19:49:35 +0100 Subject: [PATCH] [ADD] stock_available_sale Take sale quotations into account in the stock quantity available to promise --- stock_available/res_config.py | 7 + stock_available/res_config_view.xml | 4 + stock_available_immediately/product.py | 1 - stock_available_sale/__init__.py | 21 ++ stock_available_sale/__openerp__.py | 44 ++++ stock_available_sale/i18n/fr.po | 49 ++++ .../i18n/stock_available_sale.pot | 45 ++++ stock_available_sale/product.py | 232 ++++++++++++++++++ stock_available_sale/product_view.xml | 19 ++ stock_available_sale/test/quoted_qty.yml | 66 +++++ 10 files changed, 487 insertions(+), 1 deletion(-) create mode 100644 stock_available_sale/__init__.py create mode 100644 stock_available_sale/__openerp__.py create mode 100644 stock_available_sale/i18n/fr.po create mode 100644 stock_available_sale/i18n/stock_available_sale.pot create mode 100644 stock_available_sale/product.py create mode 100644 stock_available_sale/product_view.xml create mode 100644 stock_available_sale/test/quoted_qty.yml diff --git a/stock_available/res_config.py b/stock_available/res_config.py index 8001b371e..c38226ced 100644 --- a/stock_available/res_config.py +++ b/stock_available/res_config.py @@ -31,6 +31,13 @@ class StockConfig(orm.TransientModel): help="This will subtract incoming quantities from the quantities " "available to promise.\n" "This installs the module stock_available_immediately."), + 'module_stock_available_sale': fields.boolean( + 'Exclude goods already in sale quotations', + help="This will subtract quantities from the sale quotations from " + "the quantities available to promise.\n" + "This installs the modules stock_available_sale.\n" + "If the modules sale and sale_delivery_date are not " + "installed, this will install them too"), 'module_stock_available_mrp': fields.boolean( 'Include the production potential', help="This will add the quantities of goods that can be " diff --git a/stock_available/res_config_view.xml b/stock_available/res_config_view.xml index d4f378fb8..0eadadd42 100644 --- a/stock_available/res_config_view.xml +++ b/stock_available/res_config_view.xml @@ -15,6 +15,10 @@