[FIX] crm, hr_payroll: Corrected date problem in ymls.
authorUjjvala Collins (OpenERP) <uco@tinyerp.com>
Mon, 31 Jan 2011 05:25:59 +0000 (10:55 +0530)
committerUjjvala Collins (OpenERP) <uco@tinyerp.com>
Mon, 31 Jan 2011 05:25:59 +0000 (10:55 +0530)
bzr revid: uco@tinyerp.com-20110131052559-pnmgnhkcop52186r

addons/crm/test/test_crm_meeting.yml
addons/crm/test/test_crm_opportunity.yml
addons/crm/test/test_crm_phonecall.yml
addons/hr_payroll/test/payroll_register.yml

index d7c8a46..d143de3 100644 (file)
@@ -7,7 +7,7 @@
   !record {model: crm.meeting, id: crm_meeting_regardingpresentation0}:
     categ_id: crm.categ_meet2
     date: !eval time.strftime('%Y-%m-%d 16:04:00')
-    date_deadline: !eval "'%s-%s-%s 00:04:00' %(datetime.now().year,datetime.now().month,datetime.now().day+1)"
+    date_deadline: !eval "'%s-%s-%d 00:04:00' %(datetime.now().year, (datetime.now()+timedelta(1)).month, (datetime.now()+timedelta(1)).day)"
     duration: 8.0
     email_from: info@balmerinc.be
     location: Ahmedabad
index 3a25db6..a31c7af 100644 (file)
@@ -51,7 +51,7 @@
   I click on "schedule call" button and select planned date for the call.
 -
   !record {model: crm.opportunity2phonecall, id: crm_opportunity2phonecall_abcfuelcounits0}:
-    date: !eval "'%s-%s-%s 11:15:00' %(datetime.now().year,datetime.now().month,datetime.now().day+1)"
+    date: !eval "'%s-%s-%s 11:15:00' %(datetime.now().year, (datetime.now()+timedelta(1)).month, (datetime.now()+timedelta(1)).day)"
     name: 'ABC FUEL CO 829264 - 10002 units'
     section_id: crm.section_sales_department
     user_id: base.user_demo
@@ -72,7 +72,7 @@
   I can see phonecall record after click on "Schedule call" wizard.
 -
   !record {model: crm.phonecall, id: crm_phonecall_abcfuelcounits0}:
-    date: !eval "'%s-%s-%s 11:15:00' %(datetime.now().year,datetime.now().month,datetime.now().day+1)"
+    date: !eval "'%s-%s-%s 11:15:00' %(datetime.now().year, (datetime.now()+timedelta(1)).month, (datetime.now()+timedelta(1)).day)"
     duration: 3.0
     name: 'ABC FUEL CO 829264 - 10002 units'
     partner_address_id:  base.res_partner_address_1
index 98020d3..a5726da 100644 (file)
@@ -64,8 +64,8 @@
 -
   !record {model: crm.meeting, id: crm_meeting_interviewcall0}:
     alarm_id: base_calendar.alarm3
-    date: !eval "'%s-%s-%s 09:00:00' %(datetime.now().year,datetime.now().month,datetime.now().day+1)"
-    date_deadline: !eval "'%s-%s-%s 17:00:00' %(datetime.now().year,datetime.now().month,datetime.now().day+1)"
+    date: !eval "'%s-%s-%s 09:00:00' %(datetime.now().year, (datetime.now()+timedelta(1)).month, (datetime.now()+timedelta(1)).day)"
+    date_deadline: !eval "'%s-%s-%s 17:00:00' %(datetime.now().year, (datetime.now()+timedelta(1)).month, (datetime.now()+timedelta(1)).day)"
     duration: 8.0
     email_from: info@balmerinc.be
     name: Interview call
@@ -81,7 +81,7 @@
   phonecall.
 -
   !record {model: crm.phonecall2phonecall, id: crm_phonecall2phonecall_interviewcall0}:
-    date: !eval "'%s-%s-%s 19:49:00' %(datetime.now().year,datetime.now().month,datetime.now().day+1)"
+    date: !eval "'%s-%s-%s 19:49:00' %(datetime.now().year, (datetime.now()+timedelta(1)).month, (datetime.now()+timedelta(1)).day)"
     name: Interview call
     section_id: crm.section_sales_department
     user_id: base.user_root
index 4a16daf..ce2284c 100644 (file)
@@ -26,7 +26,7 @@
   I create a payroll register record.
 -
   !record {model: hr.payroll.register, id: hr_payroll_register_payroll0}:
-    date: !eval "'%s-%s-%s' %(datetime.now().year,datetime.now().month,datetime.now().day+1)"
+    date: !eval "'%s-%s-%s' %(datetime.now().year, (datetime.now()+timedelta(1)).month, (datetime.now()+timedelta(1)).day)"
     line_ids:
       - employee_id: hr_payroll.hr_employee_keith0
     name: payroll1