add button kitchen
This commit is contained in:
parent
b38ac4cb3e
commit
55cefcb8ca
5
sale.py
5
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))
|
||||
|
Loading…
Reference in New Issue
Block a user