Renamed summary helper to summary editor.
This commit is contained in:
@ -37,7 +37,7 @@ from accounting import db
|
||||
from accounting.locale import lazy_gettext
|
||||
from accounting.models import Transaction, Account, JournalEntry, \
|
||||
TransactionCurrency, Currency
|
||||
from accounting.transaction.summary_helper import SummaryHelper
|
||||
from accounting.transaction.summary_editor import SummaryEditor
|
||||
from accounting.utils.random_id import new_id
|
||||
from accounting.utils.strip_text import strip_text, strip_multiline_text
|
||||
from accounting.utils.user import get_current_user_pk
|
||||
@ -391,12 +391,12 @@ class TransactionForm(FlaskForm):
|
||||
if isinstance(x, str) or isinstance(x, LazyString)]
|
||||
|
||||
@property
|
||||
def summary_helper(self) -> SummaryHelper:
|
||||
"""Returns the summary helper.
|
||||
def summary_editor(self) -> SummaryEditor:
|
||||
"""Returns the summary editor.
|
||||
|
||||
:return: The summary helper.
|
||||
:return: The summary editor.
|
||||
"""
|
||||
return SummaryHelper()
|
||||
return SummaryEditor()
|
||||
|
||||
|
||||
T = t.TypeVar("T", bound=TransactionForm)
|
||||
|
@ -14,7 +14,7 @@
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
"""The summary helper.
|
||||
"""The summary editor.
|
||||
|
||||
"""
|
||||
import typing as t
|
||||
@ -178,7 +178,7 @@ class SummaryEntryType:
|
||||
|
||||
@property
|
||||
def accounts(self) -> list[SummaryAccount]:
|
||||
"""Returns the suggested accounts of all tags in the summary helper in
|
||||
"""Returns the suggested accounts of all tags in the summary editor in
|
||||
the entry type, in their frequency order.
|
||||
|
||||
:return: The suggested accounts of all tags, in their frequency order.
|
||||
@ -197,11 +197,11 @@ class SummaryEntryType:
|
||||
key=lambda x: -freq[x])]
|
||||
|
||||
|
||||
class SummaryHelper:
|
||||
"""The summary helper."""
|
||||
class SummaryEditor:
|
||||
"""The summary editor."""
|
||||
|
||||
def __init__(self):
|
||||
"""Constructs the summary helper."""
|
||||
"""Constructs the summary editor."""
|
||||
self.debit: SummaryEntryType = SummaryEntryType("debit")
|
||||
"""The debit tags."""
|
||||
self.credit: SummaryEntryType = SummaryEntryType("credit")
|
Reference in New Issue
Block a user