summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2015-02-22 19:40:26 +0100
committerChristophe Simonis <chs@odoo.com>2015-02-22 19:40:26 +0100
commit95abcbb0397d4f790306bc8382f1dc06a9cf3c0b (patch)
treeda0eeb85cc34fef4999d46c35f25f35fd98f9d08 /addons
parentaec02cb4935103aa7d158b56397c191932b35fa7 (diff)
[FIX] hr_expense: correct test.
During last forward-port, a new test to `hr_expense` has been added. Adapt it to changes made in 9c83c48bc0b230896683d58e3786666ab38db304.
Diffstat (limited to 'addons')
-rw-r--r--addons/hr_expense/tests/test_journal_entries.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/addons/hr_expense/tests/test_journal_entries.py b/addons/hr_expense/tests/test_journal_entries.py
index 4df277c3f49..9795a6f8476 100644
--- a/addons/hr_expense/tests/test_journal_entries.py
+++ b/addons/hr_expense/tests/test_journal_entries.py
@@ -1,10 +1,10 @@
from openerp.tests.common import TransactionCase
-from openerp import netsvc, workflow
+from openerp import workflow
class TestCheckJournalEntry(TransactionCase):
"""
- Check journal entries when the expense product is having tax which is tax included.
+ Check journal entries when the expense product is having tax which is tax included.
"""
def setUp(self):
@@ -16,7 +16,7 @@ class TestCheckJournalEntry(TransactionCase):
self.tax_obj = self.registry('account.tax')
self.code_obj = self.registry('account.tax.code')
_, self.product_id = self.registry("ir.model.data").get_object_reference(cr, uid, "hr_expense", "air_ticket")
- _, self.employee_id = self.registry("ir.model.data").get_object_reference(cr, uid, "hr", "employee_mit")
+ self.employee = self.registry("ir.model.data").xmlid_to_object(cr, uid, "hr.employee_mit")
self.base_code_id = self.code_obj.create(cr, uid, {'name': 'Expense Base Code'})
self.tax_id = self.tax_obj.create(cr, uid, {
'name': 'Expense 10%',
@@ -30,7 +30,8 @@ class TestCheckJournalEntry(TransactionCase):
self.product_obj.write(cr, uid, self.product_id, {'supplier_taxes_id': [(6, 0, [self.tax_id])]})
self.expense_id = self.expense_obj.create(cr, uid, {
'name': 'Expense for Minh Tran',
- 'employee_id': self.employee_id,
+ 'employee_id': self.employee.id,
+ 'employee_payable_account_id': self.employee.address_home_id.property_account_payable.id,
})
self.exp_line_obj.create(cr, uid, {
'name': 'Car Travel Expenses',