diff --git a/sale.py b/sale.py index 107ff0f..f32dfc2 100644 --- a/sale.py +++ b/sale.py @@ -45,11 +45,10 @@ class Sale(metaclass=PoolMeta): context = Transaction().context #customer_order = Report.execute(records, context) data = {"content": "Esto es una pruebas"} + headers = {"accept": 'application/json', 'Content-Type': 'application/json'} url = "http://localhost:5000/print_ticket" - response = requests.post(url, json=json.dumps(data), headers={'Content-Type': 'application/json'}) - #response = requests.post(url, json={"content": customer_order[1]}) + response = requests.post(url, data=json.dumps(data), headers=headers) - raise UserError(str(response)) if response.status_code == 200: message = response.Text raise UserError(str(message))