Imporved stock computation wizards:

* better naming
* added missing wizard title
* added default values
This commit is contained in:
Bertrand Chenal
2008-10-06 12:11:57 +02:00
parent 22cfa2011d
commit 3e781fbdcb
2 changed files with 13 additions and 3 deletions
+6 -1
View File
@@ -147,11 +147,16 @@ Party()
class ChooseStockDateInit(WizardOSV):
_name = 'stock.location_stock_date.init'
_description = "Compute stock quantities"
forecast_date = fields.Date(
'Forecast Date', help='Allow to compute expected '\
'At Date', help='Allow to compute expected '\
'stock quantities for this date.\n'\
'* An empty value is an infinite date in the future.\n'\
'* A date in the past will provide historical values.')
def default_forecast_date(self, cursor, user, context=None):
return datetime.date.today()
ChooseStockDateInit()
+7 -2
View File
@@ -118,7 +118,7 @@ class Product(OSV):
state_date_clause = "True"
state_date_vals = []
else:
# date end in the past: filter on state done for the moves
# date end in the past or today: filter on state done for the moves
if context['stock_date_end'] <= datetime.date.today():
state_date_clause = '(state in (%s)) AND ('\
'(effective_date IS NULL '\
@@ -326,11 +326,16 @@ Product()
class ChooseStockDateInit(WizardOSV):
_name = 'stock.product_stock_date.init'
_description = "Compute stock quantities"
forecast_date = fields.Date(
'Forecast Date', help='Allow to compute expected '\
'At Date', help='Allow to compute expected '\
'stock quantities for this date.\n'\
'* An empty value is an infinite date in the future.\n'\
'* A date in the past will provide historical values.')
def default_forecast_date(self, cursor, user, context=None):
return datetime.date.today()
ChooseStockDateInit()
class OpenLocation(Wizard):