Imporved stock computation wizards:
* better naming * added missing wizard title * added default values
This commit is contained in:
+6
-1
@@ -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
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user