From b9bbbba76b700dacb18f34d95a81e23cabd1bacd Mon Sep 17 00:00:00 2001 From: Bertrand Chenal Date: Wed, 12 Nov 2008 21:02:01 +0100 Subject: [PATCH] Use usual method signature --- forecast.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/forecast.py b/forecast.py index 388295db7f..c79d52f65b 100644 --- a/forecast.py +++ b/forecast.py @@ -211,7 +211,8 @@ class ForecastLine(OSV): delta = line.forecast.to_date - line.forecast.from_date delta = delta.days + 1 nb_packet = int(line.quantity/line.minimal_quantity) - distribution = self.distribute(delta, nb_packet) + distribution = self.distribute( + cursor, user, delta, nb_packet, context=context) unit_price = False if line.forecast.destination.type == 'customer': unit_price = line.product.list_price @@ -247,8 +248,7 @@ class ForecastLine(OSV): move_obj.delete( cursor, user, [m.id for l in lines for m in l.moves], context=context) - @staticmethod - def distribute(delta, qty): + def distribute(self, cursor, user, delta, qty, context=None): range_delta = range(delta) a = {}.fromkeys(range_delta, 0) while qty > 0: