Renamed the "eid" field to "id" in the LineItemForm form, since the problem is found. It was the "id" property of the enclosing FormField. If we extract the form from FormField, we can still access the "id" field.

This commit is contained in:
2023-03-20 23:06:57 +08:00
parent d4fe91ec4a
commit 079dc1ab6d
8 changed files with 30 additions and 39 deletions

View File

@ -679,15 +679,6 @@ class JournalEntryLineItem(db.Model):
amount=format_amount(self.amount)))
return getattr(self, "__str")
@property
def eid(self) -> int | None:
"""Returns the line item ID. This is the alternative name of the
ID field, to work with WTForms.
:return: The line item ID.
"""
return self.id
@property
def account_code(self) -> str:
"""Returns the account code.