diff --git a/addons/hr_expense/test/expense_process.yml b/addons/hr_expense/test/expense_process.yml index c38dbad3463..af4d5aaec37 100644 --- a/addons/hr_expense/test/expense_process.yml +++ b/addons/hr_expense/test/expense_process.yml @@ -19,14 +19,14 @@ - I make Receipt for the expense. - - !python {model: hr.expense.expense}: | - self.action_receipt_create(cr, uid, [ref('sep_expenses')]) + !workflow {model: hr.expense.expense, action: done, ref: sep_expenses} - I check receipt details. - !python {model: hr.expense.expense}: | sep_expenses = self.browse(cr, uid, ref("sep_expenses"), context=context) assert sep_expenses.state == 'done', "Expense should be in 'Done' state." + assert sep_expenses.voucher_id, "Expense should have link of Purchase Receipt." assert sep_expenses.voucher_id.name == sep_expenses.name,"Receipt name is not correspond with expense name." assert sep_expenses.voucher_id.type == 'purchase', "Receipt type is not purchase receipt." assert sep_expenses.voucher_id.amount == sep_expenses.amount,"Receipt total amount is not correspond with expense total."