[MERGE] merged the team 1 branch
bzr revid: qdp-launchpad@tinyerp.com-20101018122434-zam6wvy5kzka3zxj
This commit is contained in:
commit
55fe741d5f
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue