diff --git a/hr_expense_vendor/__manifest__.py b/hr_expense_vendor/__manifest__.py index 2cde209e..82199c50 100644 --- a/hr_expense_vendor/__manifest__.py +++ b/hr_expense_vendor/__manifest__.py @@ -1,6 +1,6 @@ { 'name': 'HR Expense Vendor', - 'version': '14.0.1.0.0', + 'version': '15.0.1.0.0', 'author': 'Hibou Corp. ', 'category': 'Human Resources', 'summary': 'Record the vendor paid on expenses.', diff --git a/hr_expense_vendor/tests/test_expenses.py b/hr_expense_vendor/tests/test_expenses.py index 949fa021..c4698b86 100644 --- a/hr_expense_vendor/tests/test_expenses.py +++ b/hr_expense_vendor/tests/test_expenses.py @@ -31,7 +31,11 @@ class TestCheckVendor(TestExpenseCommon): expense = expense_form.save() action_submit_expenses = expense.action_submit_expenses() - expense_sheet = self.env[action_submit_expenses['res_model']].browse(action_submit_expenses['res_id']) + expense_sheet_form = Form(self.env[action_submit_expenses['res_model']].with_context(**action_submit_expenses.get('context', {}))) + expense_sheet = expense_sheet_form.save() + + self.assertEqual(expense_sheet.state, 'draft', 'Expense is not in Draft state') + expense_sheet.action_submit_sheet() self.assertEqual(expense_sheet.state, 'submit', 'Expense is not in Submitted state') # Approve