Skip to content

Commit 71daaf0

Browse files
Saran440ps-tubtim
authored andcommitted
[FIX] no create payments with paid by company
1 parent ebcc06a commit 71daaf0

File tree

4 files changed

+0
-89
lines changed

4 files changed

+0
-89
lines changed

hr_expense_cancel/tests/test_hr_expense_cancel.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,8 @@ def test_action_cancel_no_update_posted(self):
9898
def test_action_cancel_company_account(self):
9999
self.expense.payment_mode = "company_account"
100100
self.expense_sheet.action_sheet_move_create()
101-
102-
self.assertEqual(len(self.expense_sheet.payment_ids), 1)
103101
self.assertTrue(self.expense_sheet.account_move_id)
104-
105102
self.expense_sheet.action_cancel()
106-
payment = self.expense_sheet.payment_ids.filtered(lambda l: l.state != "cancel")
107-
self.assertFalse(payment)
108103
self.assertFalse(self.expense_sheet.account_move_id)
109104

110105
def test_action_cancel_own_account(self):

hr_expense_payment/models/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
22

33
from . import account_payment
4-
from . import hr_expense
54
from . import hr_expense_sheet

hr_expense_payment/models/hr_expense.py

Lines changed: 0 additions & 68 deletions
This file was deleted.

hr_expense_payment/tests/test_hr_expense_payment.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -83,18 +83,3 @@ def test_get_payment_vals(self):
8383
self.assertFalse(self.expense_sheet.payment_ids)
8484
payment_wizard.action_create_payments()
8585
self.assertEqual(len(self.expense_sheet.payment_ids), 1)
86-
87-
def test_action_sheet_move_create(self):
88-
self.expense.payment_mode = "company_account"
89-
self.assertFalse(self.expense_sheet.payment_ids)
90-
self.expense_sheet.action_sheet_move_create()
91-
self.assertEqual(len(self.expense_sheet.payment_ids), 1)
92-
93-
def test_action_sheet_move_create_skip_payment(self):
94-
self.expense.payment_mode = "company_account"
95-
self.assertFalse(self.expense_sheet.payment_ids)
96-
self.expense_sheet.with_context(
97-
skip_create_payment_company_account=True
98-
).action_sheet_move_create()
99-
self.assertFalse(self.expense_sheet.payment_ids)
100-
self.assertEqual(self.expense_sheet.state, "done")

0 commit comments

Comments
 (0)