Remove egenix-mx-base and replace it by python-dateutil
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
* Remove egenix-mx-base and replace it by python-dateutil
|
||||
|
||||
Version 1.4.0 - 2009-10-19
|
||||
* Bug fixes (see mercurial logs for details)
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ Prerequisites
|
||||
-------------
|
||||
|
||||
* Python 2.4 or later (http://www.python.org/)
|
||||
* egenix-mx-base (http://www.egenix.com/products/python/)
|
||||
* python-dateutil (http://labix.org/python-dateutil)
|
||||
* trytond (http://www.tryton.org/)
|
||||
* trytond_product (http://www.tryton.org/)
|
||||
* trytond_stock (http://www.tryton.org/)
|
||||
|
||||
+3
-5
@@ -3,7 +3,8 @@
|
||||
from trytond.model import ModelView, ModelWorkflow, ModelSQL, fields
|
||||
from trytond.wizard import Wizard
|
||||
import datetime
|
||||
import mx.DateTime
|
||||
import time
|
||||
from dateutil.relativedelta import relativedelta
|
||||
|
||||
STATES = {
|
||||
'readonly': "state != 'draft'",
|
||||
@@ -380,10 +381,7 @@ class ForecastComplete(Wizard):
|
||||
|
||||
res = {}
|
||||
for field in ("to_date", "from_date"):
|
||||
date = mx.DateTime.strptime(str(forecast[field]), '%Y-%m-%d')
|
||||
new_date = date - mx.DateTime.RelativeDateTime(years=1)
|
||||
res[field] = datetime.date(new_date.year, new_date.month,
|
||||
new_date.day)
|
||||
res[field] = forecast[field] - relativedelta(years=1)
|
||||
return res
|
||||
|
||||
def _get_product_quantity(self, cursor, user, data, context=None):
|
||||
|
||||
Reference in New Issue
Block a user