Native gui make almost every data editable
This commit is contained in:
1 parent
b8ac8d0185
commit
1a6674c819
48 files changed
+2168
-737
No files matched your search
@@ -7,9 +7,19 @@ class Maintenance(DbRecord):
|
||||
table = "maintenance"
|
||||
pk_field = "maintid"
|
||||
fields = ('maintid', 'vid', 'eid', 'series', 'activities', 'plan_date',
|
||||
'completion_date', 'interval_hours', 'last_hours', 'remarks',
|
||||
'maintstate')
|
||||
'plan_precision', 'completion_date', 'interval_hours', 'last_hours',
|
||||
'remarks', 'maintstate')
|
||||
|
||||
def __init__(self, db, maintid=None):
|
||||
super().__init__(db, maintid)
|
||||
self.title = _("Maintenance({})")
|
||||
|
||||
def save(self, commit=True):
|
||||
if not super().save():
|
||||
return False
|
||||
if commit:
|
||||
try:
|
||||
self.conn.commit()
|
||||
except mariadb.Error as e:
|
||||
return False
|
||||
return True
|
||||
Reference in new issue
Block a user