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

@ -66,7 +66,7 @@ class JournalEntryLineItemData:
f"{prefix}-description": self.description,
f"{prefix}-amount": str(self.amount)}
if is_update and self.id != -1:
form[f"{prefix}-eid"] = str(self.id)
form[f"{prefix}-id"] = str(self.id)
form[f"{prefix}-no"] = str(index) if self.no == -1 else str(self.no)
if self.original_line_item is not None:
assert self.original_line_item.id != -1