Skip to content

Commit

Permalink
[FIX] point_of_sale: Fix errors of the new version of IoT 23.07
Browse files Browse the repository at this point in the history
In the new version of the iot we import a new "crypt" library which is not available for windows

Addition of the class in the input of the password

closes odoo#128467

X-original-commit: f84bbfa
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
  • Loading branch information
qle-odoo committed Jul 15, 2023
1 parent da8997d commit 54ea51a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion addons/hw_drivers/tools/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import time
import contextlib
import requests
import crypt
import secrets

from odoo import _, http, service
Expand All @@ -28,6 +27,11 @@

_logger = logging.getLogger(__name__)

try:
import crypt
except ImportError:
_logger.warning('Could not import library crypt')

#----------------------------------------------------------
# Helper
#----------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion addons/hw_posbox_homepage/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def server(self):
})

# Get password
@http.route('/hw_posbox_homepage/password', type='json', auth='none', method=['POST'])
@http.route('/hw_posbox_homepage/password', type='json', auth='none', methods=['POST'])
def view_password(self):
return helpers.generate_password()

Expand Down
2 changes: 1 addition & 1 deletion addons/hw_posbox_homepage/views/remote_connect.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ <h2 class="text-center">Remote Debugging</h2>
you trust.
</p>
<div class='text-center'>
<input type="text" placeholder="pi user password" disabled>
<input class="password" type="text" placeholder="pi user password" disabled>
<a class="btn view-password" style="margin: 18px auto;"href="#">Generate password</a><br/>
<input type="text" id="auth_token" size="42" placeholder="Authentication Token"/> <br/>
<a class="btn" style="margin: 18px auto;" id="enable_debug" href="#">Enable Remote Debugging</a>
Expand Down

0 comments on commit 54ea51a

Please sign in to comment.