Skip to content

Commit 6daf918

Browse files
committed
fix: honor delta from query param
1 parent 1a00328 commit 6daf918

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

frepple/controllers/frepplexml.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ def xml(self, **kwargs):
150150
company=company_name,
151151
mode=int(kwargs.get("mode", 1)),
152152
timezone=kwargs.get("timezone", None),
153+
delta=int(kwargs.get("delta", 999)),
153154
singlecompany=kwargs.get("singlecompany", "false").lower()
154155
== "true",
155156
version=version,

frepple/controllers/outbound.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1425,12 +1425,13 @@ def export_salesorders(self):
14251425
"""
14261426
# Get all sales order lines
14271427
search = (
1428-
[("product_id", "!=", False)]
1428+
[("product_id", "!=", False), ("order_id.active", "!=", False)]
14291429
if self.delta >= 999
14301430
else [
14311431
("product_id", "!=", False),
1432+
("order_id.active", "!=", False),
14321433
(
1433-
"write_date",
1434+
"order_id.date_order",
14341435
">=",
14351436
datetime.now() - timedelta(days=self.delta),
14361437
),

0 commit comments

Comments
 (0)