Skip to content
Snippets Groups Projects
Commit 55fe741d authored by Quentin De Paoli's avatar Quentin De Paoli
Browse files

[MERGE] merged the team 1 branch

bzr revid: qdp-launchpad@tinyerp.com-20101018122434-zam6wvy5kzka3zxj
parents 8144076c ed4308e1
No related branches found
No related tags found
No related merge requests found
......@@ -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')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment