no heirs message

This commit is contained in:
2026-05-10 00:26:19 -04:00
parent 397da520c9
commit cccd3cc984

45
qt.py
View File

@@ -2245,8 +2245,6 @@ class BalWaitingDialog(BalDialog):
def finished(self): def finished(self):
_logger.info("finished") _logger.info("finished")
def wait(self):
self.thread.wait()
def on_accepted(self): def on_accepted(self):
self.thread.stop() self.thread.stop()
@@ -2337,7 +2335,7 @@ class BalBuildWillDialog(BalDialog):
self.labelsbox = QVBoxLayout(self.qwidget) self.labelsbox = QVBoxLayout(self.qwidget)
self.setMinimumWidth(600) self.setMinimumWidth(600)
self.setMinimumHeight(100) self.setMinimumHeight(100)
self.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Preferred) self.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Expanding)
self.labels = [] self.labels = []
self.check_row = None self.check_row = None
self.inval_row = None self.inval_row = None
@@ -2378,15 +2376,14 @@ class BalBuildWillDialog(BalDialog):
_logger.debug( _logger.debug(
"during phase1 CAE: {}, Continue to invalidate".format(cae) "during phase1 CAE: {}, Continue to invalidate".format(cae)
) )
self.msg_set_checking( self.msg_set_status("checking variables",varrow, "Check Alive Threshold Passed: you have to Invalidate your old Will",self.COLOR_ERROR)
self.msg_warning(
"Check Alive Threshold Passed: you have to Invalidate your old Will"
)
)
else: else:
raise cae raise cae
return None, tx return None, tx
except NoHeirsException:
self.msg_set_status("checking variables", varrow,"No Heirs",self.COLOR_ERROR)
#self.msg_set_checking("No Heirs")
return False, None
except Exception as e: except Exception as e:
raise e raise e
try: try:
@@ -2424,7 +2421,6 @@ class BalBuildWillDialog(BalDialog):
except NoHeirsException as e: except NoHeirsException as e:
_logger.debug("no heirs") _logger.debug("no heirs")
self.msg_set_checking("No Heirs") self.msg_set_checking("No Heirs")
raise e
except NotCompleteWillException as e: except NotCompleteWillException as e:
_logger.debug(f"not complete {e} true") _logger.debug(f"not complete {e} true")
message = False message = False
@@ -2450,11 +2446,9 @@ class BalBuildWillDialog(BalDialog):
try: try:
txs = self.bal_window.build_will() txs = self.bal_window.build_will()
if not txs: if not txs:
self.msg_set_status( self.msg_set_building(
_("Balance is too low. No transaction was built"), _("Balance is too low, or CheckAlive is in the past.Skipped"),
None, color = self.COLOR_ERROR,
_("Skipped"),
self.COLOR_ERROR,
) )
return False, None return False, None
@@ -2711,7 +2705,10 @@ class BalBuildWillDialog(BalDialog):
a, b, c = error a, b, c = error
self.msg_edit_row(self.msg_error(f"Error: {b}")) self.msg_edit_row(self.msg_error(f"Error: {b}"))
_logger.error(f"error phase1: {b}") _logger.error(f"error phase1: {b}")
button=QPushButton(_("Close"))
button.clicked.connect(self.close)
self.vbox.addWidget(button)
self.resize(self.vbox.sizeHint()+button.sizeHint()*2)
def on_error_phase2(self, error): def on_error_phase2(self, error):
self.bal_window.upade_all() self.bal_window.upade_all()
a, b, c = error a, b, c = error
@@ -2728,10 +2725,10 @@ class BalBuildWillDialog(BalDialog):
_("Invalidating old will"), self.inval_row, status _("Invalidating old will"), self.inval_row, status
) )
def msg_set_building(self, status=None, row=None): def msg_set_building(self, status=None, row=None,color=None):
row = self.build_row if row is None else row row = self.build_row if row is None else row
self.build_row = self.msg_set_status( self.build_row = self.msg_set_status(
"Building your will", self.build_row, status "Building your will", self.build_row, status, color
) )
def msg_set_signing(self, status=None, row=None): def msg_set_signing(self, status=None, row=None):
@@ -2757,9 +2754,12 @@ class BalBuildWillDialog(BalDialog):
def msg_warning(self, e): def msg_warning(self, e):
return "<font color='{}'>{}</font".format(self.COLOR_WARNING, e) return "<font color='{}'>{}</font".format(self.COLOR_WARNING, e)
def msg_set_status(self, msg, row=None, status=None, color="#000000"): def msg_set_status(self, msg, row=None, status=None, color=None):
status = "Wait" if status is None else status status = "Wait" if status is None else status
line = "<font color={}>{}:\t{}</font>".format(color, _(msg), status) if color is None:
line = f"{_(msg)}:\t{status}"
else:
line = "<font color={}>{}:\t{}</font>".format(color, _(msg), status)
return self.msg_edit_row(line, row) return self.msg_edit_row(line, row)
def ask_password(self, msg=None): def ask_password(self, msg=None):
@@ -3696,6 +3696,7 @@ class WillExecutorListWidget(MyTreeView):
wout[k] = self.parent.willexecutors_list[k] wout[k] = self.parent.willexecutors_list[k]
self.parent.update_willexecutors(wout) self.parent.update_willexecutors(wout)
self.parent.save_willexecutors()
self.update() self.update()
def get_edit_key_from_coordinate(self, row, col): def get_edit_key_from_coordinate(self, row, col):
@@ -3706,18 +3707,22 @@ class WillExecutorListWidget(MyTreeView):
def delete(self, selected_keys): def delete(self, selected_keys):
for key in selected_keys: for key in selected_keys:
del self.parent.willexecutors_list[key] del self.parent.willexecutors_list[key]
self.parent.save_willexecutors()
self.update() self.update()
def select(self, selected_keys): def select(self, selected_keys):
for wid, w in self.parent.willexecutors_list.items(): for wid, w in self.parent.willexecutors_list.items():
if wid in selected_keys: if wid in selected_keys:
w["selected"] = True w["selected"] = True
self.parent.save_willexecutors()
self.update() self.update()
def deselect(self, selected_keys): def deselect(self, selected_keys):
for wid, w in self.parent.willexecutors_list.items(): for wid, w in self.parent.willexecutors_list.items():
if wid in selected_keys: if wid in selected_keys:
w["selected"] = False w["selected"] = False
self.parent.save_willexecutors()
self.update() self.update()
def on_edited(self, idx, edit_key, *, text): def on_edited(self, idx, edit_key, *, text):