Fix: Kots should be sorted by date as a relationship of the voucher. This was causing them to appear in random order in sales.
This commit is contained in:
1 parent
1c222872d2
commit
567fb836b3
4 files changed
+22
-29
No files matched your search
@@ -13,6 +13,7 @@ from sqlalchemy import (
|
||||
from sqlalchemy.dialects.postgresql import UUID
|
||||
from sqlalchemy.orm import relationship
|
||||
|
||||
from .kot import Kot
|
||||
from .meta import Base
|
||||
from .voucher_type import VoucherType
|
||||
|
||||
@@ -51,6 +52,7 @@ class Voucher(Base):
|
||||
backref="voucher",
|
||||
cascade="delete, delete-orphan",
|
||||
cascade_backrefs=False,
|
||||
order_by=Kot.date,
|
||||
)
|
||||
settlements = relationship(
|
||||
"Settlement",
|
||||
|
||||
Reference in new issue
Block a user