Commit Graph

96 Commits

Author SHA1 Message Date
5db13393cc Renamed "transaction" to "voucher", "cash expense transaction" to "cash disbursement voucher", and "cash income transaction" to "cash receipt voucher". 2023-03-19 13:56:46 +08:00
b69a519904 Updated tempus-dominus from 6.2.10 to 6.4.3 in the base template of the test site. 2023-03-19 10:16:12 +08:00
5571c0d01f Renamed all the is_XXX_needed properties to is_need_XXX. For example, especially the is_offset_needed property to is_need_offset, to be clear and understandable. 2023-03-18 22:52:29 +08:00
98e1bad413 Renamed the test_not_needed test to test_not_need in the PaginationTestCase test case. 2023-03-18 22:43:53 +08:00
2e5f9ee01f Simplified the text data in the TestData clas in testlib_offset.py. 2023-03-18 03:41:51 +08:00
f901a0020f Revised the amount limitation tests in the OffsetTestCase test case, to be clear. 2023-03-18 03:38:07 +08:00
fc2be75c3b Changed the type of the amount property in the testing JournalEntryData data model from string to Decimal. 2023-03-18 03:21:47 +08:00
96c131940b Revised the date limitation tests in the OffsetTestCase test case, to be clear. 2023-03-18 03:08:08 +08:00
b9435a255b Added the "/.errors" route to the application in the "create_test_app" function in testlib.py, to make it easier to test. 2023-03-18 02:59:28 +08:00
d88b3ac770 Added to track the net balance and offset of the original entries. 2023-03-17 22:32:01 +08:00
d9ecf51c6d Added the "create_test_app" function in testlib.py to replace "create_app" to prevent common mistakes. Added a get_csrf_token_view route to the application, and changed the get_csrf_token function to retrieve the CSRF token with the route without parsing the HTML for the CSRF token. 2023-03-14 21:28:35 +08:00
8061a23fdc Renamed the AbstractUserUtils class to UserUtilityInterface, and added the can_view and can_edit functions to the UserUtilityInterface interface. There is no need to separately supply two additional can_view and can_edit callbacks. 2023-03-14 17:03:18 +08:00
8e5377a416 Replaced the payable account with the petty-cash account in the SummeryEditorTestCase test case. 2023-03-12 01:34:47 +08:00
1d6a53f7cd Revised the account form so that the if-offset-needed option is only available for real accounts. 2023-03-12 01:34:42 +08:00
6ad4fba9cd Moved the "accounting.transaction.operators", "accounting.transaction.summary_editor" and "accounting.transaction.form.account_option" modules into the "accounting.transaction.utils" module. 2023-03-11 16:34:28 +08:00
05ac5158f8 Added the default report view as the income and expenses log with the default currency, default account and default period. Changed the previous default journal links to the current default. 2023-03-09 20:59:09 +08:00
13e3ef5875 Replaced querying the accounts later with the "selectinload" query option in the journal and search reports, and restored the lazy setting in the account relationship of the JournalEntry data model. 2023-03-09 14:36:40 +08:00
f59378002e Removed the list_transactions view that is not used now. 2023-03-09 14:36:38 +08:00
8fc33131dd Changed the transaction operation to return to the default journal instead of the transaction list. The transaction list is to be removed. There is no link to the transaction list at all, and it's layout is undecided. 2023-03-09 14:36:38 +08:00
1f87bc00e8 Removed the excess "with_type" from the success redirection of the update_transaction view. 2023-03-09 14:36:33 +08:00
39723b1299 Removed the lazy setting from the account relationship of the JournalEntry data model. It results in problems in the income and expense report. 2023-03-09 06:36:25 +08:00
55c2ce6695 Added Tempus Dominus to the CDN of the test site. 2023-03-04 14:36:10 +08:00
493677e0aa Added "crossorigin" to the CDN stylesheets in the test site. 2023-03-04 14:36:08 +08:00
4eb9346d8d Renamed summary helper to summary editor. 2023-03-04 07:00:46 +08:00
9cd9e90be0 Renamed the variables in the tests of the AccountTestCase and CurrencyTestCase test cases, for simplicity. 2023-03-01 21:09:14 +08:00
2839dc60b4 Revised the documentation of the PREFIX constant in test_account.py, test_currency.py, and test_transaction.py. 2023-03-01 20:22:27 +08:00
1402a12f04 Simplified the logic in the add_txn function in testlib_txn.py. 2023-03-01 00:51:24 +08:00
f049b5d7ee Revised the form data used in the SummeryHelperTestCase test case, to avoid problems with SonarQube. 2023-03-01 00:51:24 +08:00
d5c2231794 Added the summary helper for the transaction form. 2023-02-28 15:49:01 +08:00
de48c848da Revised the code in the common account shorts in testlib_txn.py. 2023-02-28 08:24:15 +08:00
9cdcc828a7 Added the add_txn function to testlib_txn.py and applied it in the transaction test cases. 2023-02-28 08:14:23 +08:00
cabfe268ce Added the page_37 and page_size_15_default constants in the test_malformed test of the PaginationTestCase test case, for consistency. 2023-02-27 17:15:29 +08:00
26df71014b Added the LIST_URL and DETAIL_URI constants to test_base_account.py, for consistency. 2023-02-27 16:37:01 +08:00
3126ee8153 Added the NEXT_URI constant to test_account.py, for consistency. 2023-02-27 16:37:01 +08:00
952061c4bb Added the TEST_SERVER constant in testlib.py, for consistency. 2023-02-27 16:25:36 +08:00
788225826d Added resource integrity to the decimal.js-light CDN in the test site. 2023-02-27 16:21:30 +08:00
c52081e528 Replaced decimal.js CDN from cdnjs with decimal.js-light CDN from jsDelivr in the base template of the test site. 2023-02-27 16:20:58 +08:00
1f235acdf9 Added resource integrity to the bootstrap CDN in the test site. 2023-02-27 16:07:59 +08:00
488e72679e Revised the NextUriTestCase view, split the test_next_uri test into the two test_next_uri and test_no_next_uri tests, and replaced the decorator with add_url_rule to work around the security audit from SonarQube. 2023-02-27 15:57:39 +08:00
6d43b14862 Added CSRF to the test_next_uri test in the NextUriTestCase test case. 2023-02-27 15:35:35 +08:00
05fde3a742 Added the transaction management. 2023-02-27 15:28:45 +08:00
f25c993b75 Revised the translation of the test site. 2023-02-27 10:30:19 +08:00
5a6e4f5b5e Replaced the import for the db object from the accounting model with the test site in test_account.py and test_currency.py. They are the same object, and the db object from the test site is safe at the compile time. 2023-02-25 18:04:32 +08:00
f878ba5535 Revised to rewind the time in the test_update_not_modified tests of the AccountTestCase and CurrencyTestCase test cases, so that the test cases don't have to wait for the time to be different. 2023-02-25 18:04:29 +08:00
e7c36ba13a Revised the type hints in the test_update_not_modified tests of the AccountTestCase and CurrencyTestCase test cases. 2023-02-25 18:04:27 +08:00
2e3633b205 Revised to sort the accounts in the same base before saving an account to a new base, and added the test_change_base_code test to the AccountTestCase test case for this. 2023-02-25 09:44:17 +08:00
d9c08568cf Revised the test_update_not_modified tests to be more specific in the AccountTestCase and CurrencyTestCase test cases. 2023-02-21 09:38:31 +08:00
a73e3204b9 Renamed the "accounting.utils.next_url" module to "accounting.utils.next_uri". 2023-02-20 16:08:32 +08:00
2ab60b2224 Replaced "unittest.TestCase.assert*" methods with "assert" in the common test functions, for simplicity. 2023-02-13 19:18:41 +08:00
36f55900c7 Renamed "fh" to "fp" when opening files, following the Python convention. 2023-02-09 00:02:14 +08:00