Remove egenix-mx-base and replace it by python-dateutil

This commit is contained in:
Cédric Krier
2009-12-17 11:42:15 +01:00
parent e2aa5fd0df
commit 6fc3e4e679
4 changed files with 7 additions and 7 deletions
+2
View File
@@ -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)
+1 -1
View File
@@ -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
View File
@@ -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):
+1 -1
View File
@@ -7,7 +7,7 @@ import re
info = eval(file('__tryton__.py').read())
requires = ['egenix-mx-base']
requires = ['python-dateutil']
for dep in info.get('depends', []):
if not re.match(r'(ir|res|workflow|webdav)(\W|$)', dep):
requires.append('trytond_' + dep)