Support arguments in generate_requests
As the arguments are not used and may vary again in the future, the best is to use the generic args/kwargs. issue6154 review31861002
This commit is contained in:
1 parent
10386b861a
commit
a25bdb0fce
1 file changed
+2
-2
+2
-2
@@ -10,7 +10,7 @@ class PurchaseRequest:
|
||||
__name__ = 'purchase.request'
|
||||
|
||||
@classmethod
|
||||
def generate_requests(cls):
|
||||
def generate_requests(cls, *args, **kwargs):
|
||||
pool = Pool()
|
||||
Forecast = pool.get('stock.forecast')
|
||||
Date = pool.get('ir.date')
|
||||
@@ -22,5 +22,5 @@ class PurchaseRequest:
|
||||
('state', '=', 'done'),
|
||||
])
|
||||
Forecast.create_moves(forecasts)
|
||||
super(PurchaseRequest, cls).generate_requests()
|
||||
super(PurchaseRequest, cls).generate_requests(*args, **kwargs)
|
||||
Forecast.delete_moves(forecasts)
|
||||
Reference in new issue
Block a user