Skip to content

Commit

Permalink
fix: honor delta from query param
Browse files Browse the repository at this point in the history
  • Loading branch information
dnplkndll committed May 25, 2024
1 parent 1a00328 commit 6daf918
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions frepple/controllers/frepplexml.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ def xml(self, **kwargs):
company=company_name,
mode=int(kwargs.get("mode", 1)),
timezone=kwargs.get("timezone", None),
delta=int(kwargs.get("delta", 999)),
singlecompany=kwargs.get("singlecompany", "false").lower()
== "true",
version=version,
Expand Down
5 changes: 3 additions & 2 deletions frepple/controllers/outbound.py
Original file line number Diff line number Diff line change
Expand Up @@ -1425,12 +1425,13 @@ def export_salesorders(self):
"""
# Get all sales order lines
search = (
[("product_id", "!=", False)]
[("product_id", "!=", False), ("order_id.active", "!=", False)]
if self.delta >= 999
else [
("product_id", "!=", False),
("order_id.active", "!=", False),
(
"write_date",
"order_id.date_order",
">=",
datetime.now() - timedelta(days=self.delta),
),
Expand Down

0 comments on commit 6daf918

Please sign in to comment.