Work on native gui. Display records and add missing tasks and measurements.

This commit is contained in:
2026-09-30 16:18:44 +02:00
parent c3109b9d2a
commit 131af7d9e7
45 changed files with 6043 additions and 1966 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ class Cable(DbRecord):
table = "cable"
pk_field = "cableid"
fields = ('cableid', 'vid', 'cablename', 'cabletype', 'techname', 'length',
fields = ('vid', 'cablename', 'cabletype', 'techname', 'length',
'conductors', 'diameter', 'xsection', 'weight', 'color', 'supplier',
'manufacturer', 'cablecond', 'remarks')
+2 -2
View File
@@ -23,7 +23,7 @@ class DbRecord:
self.conn = db.conn
self.last_update = None
self.title = _("DbRecord({})") # for pretty print
self._title = _("DbRecord({})") # for pretty print
if record_id is not None:
self.pk_value = int(record_id)
@@ -142,7 +142,7 @@ class DbRecord:
return True
def __str__(self):
out = [self.title.format(self.pk_value)]
out = [self._title.format(self.pk_value)]
for field in self.fields:
value = getattr(self, field, None)
out.append(" {:15}: {}".format(field, value))
+1 -1
View File
@@ -6,7 +6,7 @@ class Document(DbRecord):
table = "document"
pk_field = "docid"
fields = ('docid', 'doctype', 'mimetype', 'filename', 'extension',
fields = ('doctype', 'mimetype', 'filename', 'extension',
'hash', 'docsize', 'doctime', 'docdate', 'title', 'pages', 'remarks',
'roleaccess')
+1 -1
View File
@@ -6,7 +6,7 @@ class Equipment(DbRecord):
table = "equipment"
pk_field = "eid"
fields = ('eid', 'vid' 'ename', 'shortname', 'model', 'ecat', 'serial',
fields = ('eid', 'vid', 'ename', 'shortname', 'model', 'ecat', 'serial',
'supplier', 'manufacturer', 'purchdate', 'price', 'weight', 'remarks',
'flags')
+3 -2
View File
@@ -6,8 +6,9 @@ class Inventory(DbRecord):
table = "inventory"
pk_field = "invid"
fields = ('invid', 'invname', 'conttype', 'sid', 'boxid', 'eid', 'number',
'weight', 'price', 'purchdate', 'invcond', 'remarks', 'flags')
fields = ('invid', 'invname', 'icat', 'conttype', 'sid', 'boxid', 'eid',
'number', 'weight', 'price', 'purchdate', 'invcond', 'remarks',
'flags')
def __init__(self, db, invid=None):
super().__init__(db, invid)
+3 -3
View File
@@ -5,9 +5,9 @@ from .dbrecord import DbRecord
class Project(DbRecord):
table = "project"
pk_field = "prokid"
fields = ('projid', 'projname', 'vid', 'responsible', 'startdate',
'duration', 'costs_plan', 'costs_final', 'remarks', 'projstate')
pk_field = "projid"
fields = ('projname', 'vid', 'responsible', 'startdate', 'duration',
'costs_plan', 'costs_final', 'remarks', 'projstate')
def __init__(self, db, projid=None):
super().__init__(db, projid)
+2 -2
View File
@@ -6,8 +6,8 @@ class Task(DbRecord):
table = "task"
pk_field = "taskid"
fields = ('taskid', 'vid', 'projid', 'taskname', 'priority', 'taskstate',
'state_ts', 'plandate', 'duedate', 'started', 'finished', 'responsible')
fields = ('vid', 'projid', 'taskname', 'priority', 'taskstate', 'state_ts',
'plandate', 'duedate', 'started', 'finished', 'responsible', 'remarks')
def __init__(self, db, taskid=None):
super().__init__(db, taskid)