diff options
| author | Denis Vermylen (dve) <dve@odoo.com> | 2016-07-05 16:10:09 +0200 |
|---|---|---|
| committer | Denis Vermylen (dve) <dve@odoo.com> | 2016-07-06 16:32:12 +0200 |
| commit | d28479fec1a2ff4e656fb39c6924bcfe1f285fb6 (patch) | |
| tree | 7b448a456efdba14f4c5e8bb01152a33dc24b66a /addons | |
| parent | 510d260434447b839a24b95822f7df85286f3041 (diff) | |
[FIX] hr_timesheet: hr_timesheet_demo.yml data adapted to be coherent with attendance demo data
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/hr_timesheet/hr_timesheet_demo.yml | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/addons/hr_timesheet/hr_timesheet_demo.yml b/addons/hr_timesheet/hr_timesheet_demo.yml index a6e3276adb0..4225d319f01 100644 --- a/addons/hr_timesheet/hr_timesheet_demo.yml +++ b/addons/hr_timesheet/hr_timesheet_demo.yml @@ -2,11 +2,12 @@ Creating demo data that require looking for accounts - !python {model: ir.model.data} : | - import time + from datetime import datetime + from dateutil.relativedelta import relativedelta vals = { 'name': 'Requirements analysis and specification', 'user_id': ref('base.user_root'), - 'date': time.strftime('%Y-%m-%d'), + 'date': (datetime.now()+relativedelta(days=-1)).strftime('%Y-%m-%d'), 'unit_amount': 2.00, 'product_id': ref('product.product_product_1'), 'product_uom_id': ref('product.product_uom_hour'), @@ -17,7 +18,7 @@ vals = { 'name': 'Design and specification', 'user_id': ref('base.user_root'), - 'date': time.strftime('%Y-%m-%d'), + 'date': (datetime.now()+relativedelta(days=-1)).strftime('%Y-%m-%d'), 'unit_amount': 1.00, 'product_id': ref('product.product_product_1'), 'product_uom_id': ref('product.product_uom_hour'), @@ -28,7 +29,7 @@ vals = { 'name': 'Coding and module testing', 'user_id': ref('base.user_root'), - 'date': time.strftime('%Y-%m-%d'), + 'date': (datetime.now()+relativedelta(days=-1)).strftime('%Y-%m-%d'), 'unit_amount': 3.00, 'product_id': ref('product.product_product_1'), 'product_uom_id': ref('product.product_uom_hour'), @@ -39,7 +40,7 @@ vals = { 'name': 'Integration and system testing', 'user_id': ref('base.user_root'), - 'date': time.strftime('%Y-%m-%d'), + 'date': (datetime.now()+relativedelta(days=-1)).strftime('%Y-%m-%d'), 'unit_amount': 1.00, 'product_id': ref('product.product_product_1'), 'product_uom_id': ref('product.product_uom_hour'), @@ -50,7 +51,7 @@ vals = { 'name': 'Delivery and maintenance', 'user_id': ref('base.user_root'), - 'date': time.strftime('%Y-%m-%d'), + 'date': (datetime.now()+relativedelta(days=-1)).strftime('%Y-%m-%d'), 'unit_amount': 1.00, 'product_id': ref('product.product_product_1'), 'product_uom_id': ref('product.product_uom_hour'), |
