Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IoTBox: Connected CashBox Trying to pay a ticket on Point of Sale gets error and cannot open the cashbox TypeError: open_cashbox() takes 1 positional argument but 2 were given #80339

Open
carlosecv opened this issue Nov 24, 2021 · 2 comments

Comments

@carlosecv
Copy link

TypeError: open_cashbox() takes 1 positional argument but 2 were given

Impacted versions:
IoT Box 21.1
Odoo 14 and Odoo 15

Iot Box Raspberri PI 3 Model B
Printer EPSON TM-T20 II
Cash box connected to Printer

Steps to reproduce:
Do a sale on POS then try to pay on Cash to get Change

Current behavior:
Then error trying to open Cashbox:

Odoo Server Error

Traceback (most recent call last):

File "/home/pi/odoo/odoo/http.py", line 1459, in _dispatch_nodb

result = request.dispatch()

File "/home/pi/odoo/odoo/http.py", line 687, in dispatch

result = self._call_function(**self.params)

File "/home/pi/odoo/odoo/http.py", line 360, in _call_function

return self.endpoint(*args, **kwargs)

File "/home/pi/odoo/odoo/http.py", line 916, in call

return self.method(*args, **kw)

File "/home/pi/odoo/odoo/http.py", line 535, in response_wrap

response = f(*args, **kw)

File "/home/pi/odoo/addons/hw_drivers/iot_handlers/drivers/PrinterDriver.py", line 269, in default_printer_action

iot_devices[printer].action(data)

File "/home/pi/odoo/addons/hw_drivers/driver.py", line 52, in action

self._actions[data.get('action', '')](data)

Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

File "/home/pi/odoo/odoo/http.py", line 643, in _handle_exception

return super(JsonRequest, self)._handle_exception(exception)

File "/home/pi/odoo/odoo/http.py", line 301, in _handle_exception

raise exception.with_traceback(None) from new_cause

TypeError: open_cashbox() takes 1 positional argument but 2 were given

Expected behavior:

Open the cashbox without error

If i execute on my linux box this command:
echo -e -n "\x1b\x70\x00\x19\xfa" | lpr -o raw -P TM-T20II
The cashbox is opened without problem

TM-T20II is the exact name as listed by the command: lpstat -p

Video/Screenshot link (optional):

WhatsApp.Video.2021-11-24.at.9.31.34.AM.mp4

2021-11-24_09-35
Support ticket number submitted via odoo.com/help (optional)
2021-11-24_09-36
:

@Batista10-G
Copy link

We are experiencing the same issue.
As a workaround you can disable the automatic opening of the cash-box. This lets the users work with no errors.

@carlosecv carlosecv changed the title IoTBox: Connected CashBox Trying to pay a ticket on Pint of Sale gets error and cannot open the cashbox TypeError: open_cashbox() takes 1 positional argument but 2 were given IoTBox: Connected CashBox Trying to pay a ticket on Point of Sale gets error and cannot open the cashbox TypeError: open_cashbox() takes 1 positional argument but 2 were given Dec 4, 2021
@carlosecv
Copy link
Author

On old versions this cashbox it worked ok, something has changed so I will try to checkold versions of this to check the differences

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants