[FIX] project_long_term - YAML Fix Date Removed

bzr revid: jam@tinyerp.com-20110111070546-ljjvg2azmfnxhvxz
This commit is contained in:
jam-openerp
2011-01-11 12:35:46 +05:30
parent 07f321e727
commit 11ad63cfe4
@@ -5,7 +5,7 @@
I create a project 'Development and Testing'.
-
!record {model: project.project, id: project_project_project0}:
date_start: '2010-12-30'
date_start: !eval time.strftime('%Y-%m-%d')
balance: 0.0
credit: 0.0
currency_id: base.EUR
@@ -59,7 +59,12 @@
I check the starting and ending dates of both phases.
-
!python {model: project.phase}: |
import datetime
from dateutil.relativedelta import *
start = (datetime.date.today()).strftime('%Y-%m-%d')
end = (datetime.date.today() + relativedelta(days=3)).strftime('%Y-%m-%d')
first_phase = self.browse(cr, uid, ref('project_phase_firstphase0'))
assert (first_phase.date_start == '2010-12-30' and first_phase.date_end == '2011-01-03'),'Dates are wrong!'
assert (first_phase.date_start >= start and first_phase.date_end <= end),'Dates are wrong!'
second_phase = self.browse(cr, uid, ref('project_phase_secondphase0'))
assert (second_phase.date_start == '2011-01-03' and second_phase.date_end == '2011-01-05'),'Dates are wrong!'
end = (datetime.date.today() + relativedelta(days=10)).strftime('%Y-%m-%d')
assert (second_phase.date_start >= first_phase.date_end and second_phase.date_end <= end),'Dates are wrong!'