Tag: v7.0.2

Fix: Attendance Type and Account Type objects were borking as their convenience methods were not returning anything
Fix: Employee Benefits and Incentive post voucher did not reload the page
Fix: For all vouchers, to prevent double data loading on save / update either reload data or navigate, don't reload data and then navigate so that the data appears once and then disappears
This commit is contained in:
2020-06-02 08:35:36 +05:30
parent b7a1c5b816
commit 6ccb3634be
11 changed files with 99 additions and 63 deletions

View File

@ -435,7 +435,7 @@ class AttendanceType:
@classmethod
def list(cls):
list = [
return [
AttendanceType(0, "Not Set", 0),
AttendanceType(1, "Present", 1),
AttendanceType(2, "Off Day", 1),
@ -449,15 +449,14 @@ class AttendanceType:
AttendanceType(10, "Half Day + PL", 1),
AttendanceType(11, "Half Day + CL", 1),
]
return list
@classmethod
def by_name(cls, name):
next(i for i in cls.list() if i.name == name)
return next(i for i in cls.list() if i.name == name)
@classmethod
def by_id(cls, id_):
next(i for i in cls.list() if i.id == id_)
return next(i for i in cls.list() if i.id == id_)
class AccountType:
@ -499,11 +498,11 @@ class AccountType:
@classmethod
def by_name(cls, name):
next(i for i in cls.list() if i.name == name)
return next(i for i in cls.list() if i.name == name)
@classmethod
def by_id(cls, id_):
next(i for i in cls.list() if i.id == id_)
return next(i for i in cls.list() if i.id == id_)
class DbSetting(Base):