mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-09 19:40:19 +00:00
Make core.User
inherit from AbstractUser
instead of AbstractBaseUser
This commit is contained in:
@ -216,7 +216,7 @@ class TestOperation(TestCase):
|
||||
self.journal.operations.filter(target_label="Le fantome du jour").exists()
|
||||
)
|
||||
|
||||
def test__operation_simple_accounting(self):
|
||||
def test_operation_simple_accounting(self):
|
||||
sat = SimplifiedAccountingType.objects.all().first()
|
||||
response = self.client.post(
|
||||
reverse("accounting:op_new", args=[self.journal.id]),
|
||||
@ -237,15 +237,14 @@ class TestOperation(TestCase):
|
||||
"done": False,
|
||||
},
|
||||
)
|
||||
self.assertFalse(response.status_code == 403)
|
||||
self.assertTrue(self.journal.operations.filter(amount=23).exists())
|
||||
assert response.status_code != 403
|
||||
assert self.journal.operations.filter(amount=23).exists()
|
||||
response_get = self.client.get(
|
||||
reverse("accounting:journal_details", args=[self.journal.id])
|
||||
)
|
||||
self.assertTrue(
|
||||
"<td>Le fantome de l'aurore</td>" in str(response_get.content)
|
||||
)
|
||||
self.assertTrue(
|
||||
assert "<td>Le fantome de l'aurore</td>" in str(response_get.content)
|
||||
|
||||
assert (
|
||||
self.journal.operations.filter(amount=23)
|
||||
.values("accounting_type")
|
||||
.first()["accounting_type"]
|
||||
|
@ -215,17 +215,14 @@ class JournalTabsMixin(TabedViewMixin):
|
||||
return _("Journal")
|
||||
|
||||
def get_list_of_tabs(self):
|
||||
tab_list = []
|
||||
tab_list.append(
|
||||
return [
|
||||
{
|
||||
"url": reverse(
|
||||
"accounting:journal_details", kwargs={"j_id": self.object.id}
|
||||
),
|
||||
"slug": "journal",
|
||||
"name": _("Journal"),
|
||||
}
|
||||
)
|
||||
tab_list.append(
|
||||
},
|
||||
{
|
||||
"url": reverse(
|
||||
"accounting:journal_nature_statement",
|
||||
@ -233,9 +230,7 @@ class JournalTabsMixin(TabedViewMixin):
|
||||
),
|
||||
"slug": "nature_statement",
|
||||
"name": _("Statement by nature"),
|
||||
}
|
||||
)
|
||||
tab_list.append(
|
||||
},
|
||||
{
|
||||
"url": reverse(
|
||||
"accounting:journal_person_statement",
|
||||
@ -243,9 +238,7 @@ class JournalTabsMixin(TabedViewMixin):
|
||||
),
|
||||
"slug": "person_statement",
|
||||
"name": _("Statement by person"),
|
||||
}
|
||||
)
|
||||
tab_list.append(
|
||||
},
|
||||
{
|
||||
"url": reverse(
|
||||
"accounting:journal_accounting_statement",
|
||||
@ -253,9 +246,8 @@ class JournalTabsMixin(TabedViewMixin):
|
||||
),
|
||||
"slug": "accounting_statement",
|
||||
"name": _("Accounting statement"),
|
||||
}
|
||||
)
|
||||
return tab_list
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
class JournalCreateView(CanCreateMixin, CreateView):
|
||||
|
Reference in New Issue
Block a user