Skip to content

Commit

Permalink
[FIX]hr_expense_cancel:rename of action_sheet_move_cancel into action…
Browse files Browse the repository at this point in the history
…_sheet_move_post
  • Loading branch information
mav-adhoc committed Jan 29, 2025
1 parent 38ca85a commit 369eab5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hr_expense_cancel/tests/test_hr_expense_cancel.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def setUpClass(cls):
cls.expense = cls.create_expense(cls)
res = cls.expense.action_submit_expenses()
cls.expense_sheet = cls.env[res["res_model"]].browse(res["res_id"])
cls.expense_sheet.action_submit_sheet()
# cls.expense_sheet.action_submit_sheet()
cls.expense_sheet.action_approve_expense_sheets()

def _get_payment_wizard(self):
Expand All @@ -28,7 +28,7 @@ def _get_payment_wizard(self):
return register_form.save()

def test_action_cancel_posted(self):
self.expense_sheet.action_sheet_move_create()
self.expense_sheet.action_sheet_move_post()
self.assertFalse(len(self.expense_sheet.payment_ids), 1)
self.assertTrue(self.expense_sheet.account_move_ids)

Expand All @@ -50,13 +50,13 @@ def test_action_cancel_no_update_posted(self):
def test_action_cancel_company_account(self):
self.expense.payment_mode = "company_account"
self.expense_sheet.journal_id = self.company_data["default_journal_bank"]
self.expense_sheet.action_sheet_move_create()
self.expense_sheet.action_sheet_move_post()
self.assertTrue(self.expense_sheet.account_move_ids)
self.expense_sheet.action_cancel()
self.assertFalse(self.expense_sheet.account_move_ids)

def test_action_cancel_own_account(self):
self.expense_sheet.action_sheet_move_create()
self.expense_sheet.action_sheet_move_post()
payment_wizard = self._get_payment_wizard()
payment_wizard.action_create_payments()
self.assertTrue(self.expense_sheet.payment_ids)
Expand Down

0 comments on commit 369eab5

Please sign in to comment.