definable end point for sales orders, and drafts
Needs tweaking, but sales orders can now be generated to a given end date. Drafts too can be given a date, but also a datetime. Sales orders defaut time to midnight the night before, while drafts default to now, but can be given other end dates. Change-Id: Id70227650c765bb477934ffa24ad5d4b99fc34e9
This commit is contained in:
@@ -23,14 +23,14 @@ class Client(object):
|
||||
except ConnectionError as e:
|
||||
print e
|
||||
|
||||
def sales_order(self, tenants, draft):
|
||||
def sales_order(self, tenants, end, draft):
|
||||
if draft:
|
||||
url = self.endpoint + "sales_draft"
|
||||
else:
|
||||
url = self.endpoint + "sales_order"
|
||||
|
||||
for tenant in tenants:
|
||||
data = {"tenant": tenant}
|
||||
data = {"tenant": tenant, 'end': end}
|
||||
try:
|
||||
response = requests.post(url,
|
||||
headers={"Content-Type":
|
||||
|
||||
Reference in New Issue
Block a user