usawa

Signed, immutable accounting.
Info | Log | Files | Refs | Submodules | LICENSE

commit 02e7e8916e9fc8057fc0b53e9d3a1a1eb138340e
parent 133f99202b42ae66a7ab263c96b617dd5384afd2
Author: Carlosokumu <carlosokumu254@gmail.com>
Date:   Mon,  2 Mar 2026 08:43:43 +0300

add missing fields

Diffstat:
Mdummy/usawa/gui/models/entry_item.py | 31++++++++++++++++++++++++++-----
1 file changed, 26 insertions(+), 5 deletions(-)

diff --git a/dummy/usawa/gui/models/entry_item.py b/dummy/usawa/gui/models/entry_item.py @@ -1,4 +1,4 @@ -from gi.repository import Adw, Gtk, Gio,GObject +from gi.repository import GObject class EntryItem(GObject.Object): @@ -11,16 +11,18 @@ class EntryItem(GObject.Object): tx_date_ref = GObject.Property(type=str, default="") description = GObject.Property(type=str, default="") auth_state = GObject.Property(type=str, default="unsigned") + amount = GObject.Property(type=str, default="") source_unit = GObject.Property(type=str, default="") source_type = GObject.Property(type=str, default="") source_path = GObject.Property(type=str, default="") dest_unit = GObject.Property(type=str, default="") dest_type = GObject.Property(type=str, default="") dest_path = GObject.Property(type=str, default="") + attachments = GObject.Property(type=str, default="") def __init__(self, serial=0,parent_digest = "",tx_date="",tx_date_rg= "",tx_ref ="" ,description="", auth_state="unsigned", - source_unit="", source_type="", source_path="", - dest_unit="", dest_type="", dest_path=""): + amount = "",source_unit="", source_type="", source_path="", + dest_unit="", dest_type="", dest_path="",attachments = "",attachments_raw= None): super().__init__() self.serial = serial self.parent_digest = parent_digest @@ -29,9 +31,28 @@ class EntryItem(GObject.Object): self.tx_date_rg = tx_date_rg self.description = description self.auth_state = auth_state + self.amount = amount self.source_unit = source_unit self.source_type = source_type self.source_path = source_path self.dest_unit = dest_unit self.dest_type = dest_type - self.dest_path = dest_path -\ No newline at end of file + self.dest_path = dest_path + self.attachments = attachments + self.attachments_raw = attachments_raw or [] + + + + def __repr__(self): + return ( + f"EntryItem(" + f"serial={self.serial}," + f"description={self.description}," + f"source_type={self.source_type}, " + f"destination_type={self.dest_type}, " + f"amount_source={self.source_unit}:{self.source_path}, " + f"amount_dest={self.dest_unit}:{self.dest_path}, " + f"attachments='{self.attachments}', " + f"attachments_count={len(self.attachments_raw) if hasattr(self, 'attachments_raw') else 0}" + f")" + ) +\ No newline at end of file