diff --git a/addons/account/test/account_report.yml b/addons/account/test/account_report.yml index 172eb50afd501497cfd762f8a499c9eca61475e8..26888cc69c19bdb6138484e533cbede7690836e8 100644 --- a/addons/account/test/account_report.yml +++ b/addons/account/test/account_report.yml @@ -65,23 +65,23 @@ - !python {model: res.partner}: | import netsvc, tools, os, time - import datetime - from mx.DateTime import * + from datetime import datetime + from dateutil.relativedelta import relativedelta import warnings import md5 import hashlib warnings.filterwarnings('ignore',".*struct integer overflow masking is deprecated*") - start = datetime.date.fromtimestamp(time.mktime(time.strptime(time.strftime('%Y-%m-%d'), "%Y-%m-%d"))) - start = DateTime(int(start.year), int(start.month), int(start.day)) + start = datetime.fromtimestamp(time.mktime(time.strptime(time.strftime('%Y-%m-%d'), "%Y-%m-%d"))) + start = datetime(int(start.year), int(start.month), int(start.day)) res = {} for i in range(5)[::-1]: - stop = start - RelativeDateTime(days=30) + stop = start - relativedelta(days=30) res[str(i)] = { 'name': (i!=0 and (str((5-(i+1)) * 30) + '-' + str((5-i) * 30)) or ('+'+str(4 * 30))), 'stop': start.strftime('%Y-%m-%d'), 'start': (i!=0 and stop.strftime('%Y-%m-%d') or False), } - start = stop - RelativeDateTime(days=1) + start = stop - relativedelta(days=1) obj_move = self.pool.get('account.move.line') ctx = {} fy_id = ref('account.data_fiscalyear')