[FIX] make tests works
bzr revid: cto@openerp.com-20120831165521-6h5q0r2abgt0nlpt
This commit is contained in:
parent
67da3486c7
commit
4da6c7b2bc
|
@ -9,7 +9,7 @@
|
|||
-
|
||||
I assign this product(Service on Timesheet) and journal(Timesheet Journal) to employee "Quentin Paolino"
|
||||
-
|
||||
!record {model: hr.employee, id: hr.employee_qdp}:
|
||||
!record {model: hr.employee, id: hr.employee_demo}:
|
||||
product_id: product.product_product_consultant
|
||||
journal_id: hr_timesheet.analytic_journal
|
||||
-
|
||||
|
@ -69,7 +69,7 @@
|
|||
- account_id: account.analytic_agrolait
|
||||
date: !eval time.strftime('%Y-%m-%d')
|
||||
name: 'Develop yaml for hr module'
|
||||
user_id: base.user_qdp
|
||||
user_id: base.user_demo
|
||||
unit_amount: 6.00
|
||||
amount: -90.00
|
||||
product_id: product.product_product_consultant
|
||||
|
@ -97,7 +97,7 @@
|
|||
date: !eval time.strftime('%Y-%m-%d')
|
||||
name: 'Develop yaml for hr module'
|
||||
unit_amount: 2.00
|
||||
user_id: base.user_qdp
|
||||
user_id: base.user_demo
|
||||
amount: -90.00
|
||||
product_id: product.product_product_consultant
|
||||
general_account_id: account.a_expense
|
||||
|
|
|
@ -106,7 +106,7 @@
|
|||
<record id="project_task_1" model="project.task">
|
||||
<field name="planned_hours" eval="40.0"/>
|
||||
<field name="remaining_hours" eval="40.0"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="user_id" ref="base.user_demo"/>
|
||||
<field name="priority">4</field>
|
||||
<field name="project_id" ref="project.project_project_1"/>
|
||||
<field name="name">Prepare Requirements Document</field>
|
||||
|
@ -203,7 +203,7 @@
|
|||
<record id="project_task_10" model="project.task">
|
||||
<field name="planned_hours" eval="38.0"/>
|
||||
<field name="remaining_hours" eval="38.0"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="user_id" ref="base.user_demo"/>
|
||||
<field name="priority">2</field>
|
||||
<field name="project_id" ref="project.project_project_2"/>
|
||||
<field name="name">Social network integration</field>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
- state == "pending"
|
||||
-
|
||||
!record {model: project.task.delegate, id: delegate_id}:
|
||||
user_id: base.user_niv
|
||||
user_id: base.user_demo
|
||||
planned_hours: 12.0
|
||||
planned_hours_me: 2.0
|
||||
-
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
name: Test Timesheet records
|
||||
task_id: project.project_task_10
|
||||
hours: 20.0
|
||||
user_id: base.user_fpi
|
||||
user_id: base.user_demo
|
||||
company_id: base.main_company
|
||||
-
|
||||
I check Timesheet line for employee in current Timesheet
|
||||
|
@ -16,6 +16,7 @@
|
|||
start = (datetime.date.today().strftime('%Y-%m-%d'))
|
||||
task_work = self.search(cr, uid, [("name","=","Social network integration: Test Timesheet records")],context)[0]
|
||||
task_ids = self.browse(cr, uid, task_work, context)
|
||||
assert task_ids.user_id.id == ref("base.user_fpi"), 'Error, The User in Timesheet is not Correct'
|
||||
assert task_ids.user_id.id == ref("base.user_demo"), 'Error, The User in Timesheet is not Correct'
|
||||
assert task_ids.date == start, 'Error, The Date in Timesheet is not ok'
|
||||
assert task_ids.product_uom_id.name == "Hour", 'Error, The Hour in Timesheet is not ok'
|
||||
|
||||
|
|
Loading…
Reference in New Issue