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

Shopfloor Mobile App Issues in Odoo 14 #702

Closed
conroyke56 opened this issue Aug 2, 2023 · 8 comments
Closed

Shopfloor Mobile App Issues in Odoo 14 #702

conroyke56 opened this issue Aug 2, 2023 · 8 comments
Labels
bug Something isn't working stale PR/Issue without recent activity, it'll be soon closed automatically.

Comments

@conroyke56
Copy link

conroyke56 commented Aug 2, 2023

Context
Module: Shopfloor Mobile for Odoo 14
Odoo Version: 14 (latest version of OCB 14)
For context, also occurs when installing shopfloor examples.
Appears to somewhat work with demo data installed. but not on a clean database.

Description
Upon installing the Shopfloor Mobile application in Odoo 14, the app fails to appear in the app menu despite all dependencies appearing to be met. In addition, I attempted to create and delete a test app, which yielded an Odoo Server Error.
when installing with demo data, the app appears, but again, creating an app then deleting an app, same error occurs.

Steps to Reproduce
Install the Shopfloor Mobile module in Odoo 14.
Observe the absence of the app in the app menu.
Create a test app.
Attempt to delete the test app.

Expected Behavior
The Shopfloor Mobile app should appear and be operational in the app menu after installation. Additionally, when deleting an app, the operation should complete without errors.

Encountered Errors
The following error occurs when trying to delete the test app:

Traceback (most recent call last):
File "/odoo14/odoo14-server/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/odoo14/odoo14-server/odoo/http.py", line 696, in dispatch
result = self._call_function(**self.params)
File "/odoo14/odoo14-server/odoo/http.py", line 370, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/odoo14/odoo14-server/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/odoo14/odoo14-server/odoo/http.py", line 358, in checked_call
result = self.endpoint(*a, **kw)
File "/odoo14/odoo14-server/odoo/http.py", line 919, in call
return self.method(*args, **kw)
File "/odoo14/odoo14-server/odoo/http.py", line 544, in response_wrap
response = f(*args, **kw)
File "/odoo14/odoo14-server/addons/web/controllers/main.py", line 1370, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/odoo14/odoo14-server/addons/web/controllers/main.py", line 1362, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/odoo14/odoo14-server/odoo/api.py", line 399, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/odoo14/odoo14-server/odoo/api.py", line 386, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/odoo14/odoo14-server/custom/endpoint_route_handler/models/endpoint_route_sync_mixin.py", line 84, in unlink
self._unregister_controllers()
File "/odoo14/odoo14-server/custom/endpoint_route_handler/models/endpoint_route_sync_mixin.py", line 101, in _unregister_controllers
self._endpoint_registry.drop_rules(self._registered_endpoint_rule_keys())
File "/odoo14/odoo14-server/custom/endpoint_route_handler/registry.py", line 241, in drop_rules
self.cr.execute("DELETE FROM endpoint_route WHERE key IN %s", (tuple(keys),))
File "", line 2, in execute
File "/odoo14/odoo14-server/odoo/sql_db.py", line 101, in check
return f(self, *args, **kwargs)
File "/odoo14/odoo14-server/odoo/sql_db.py", line 301, in execute
res = self._obj.execute(query, params)
Exception

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

Traceback (most recent call last):
File "/odoo14/odoo14-server/odoo/http.py", line 652, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/odoo14/odoo14-server/odoo/http.py", line 317, in _handle_exception
raise exception.with_traceback(None) from new_cause
psycopg2.errors.SyntaxError: syntax error at or near ")"
LINE 1: DELETE FROM endpoint_route WHERE key IN ()
^

I have very limited coding knowledge, but for some reason, the _registered_endpoint_rule_keys() method is returning an empty list.

Additional Context
All dependencies appear to be met, the list of installed Python libraries and Odoo modules can be found in the attachments.
Potential error sources such as base_rest and the endpoint route module have been explored.
The issue persists in the latest version of OCB 14.

Potential Impact
If unresolved, this issue could potentially affect the usability and functionality of the Shopfloor Mobile module in Odoo 14 for other users.

here is a list of python libraries installed:
Package Version


apispec 6.3.0
appdirs 1.4.4
attrs 23.1.0
Babel 2.6.0
beautifulsoup4 4.12.2
cached-property 1.5.2
cachetools 5.3.1
Cerberus 1.3.4
certifi 2023.5.7
chardet 3.0.4
decorator 4.3.0
defusedxml 0.7.1
docutils 0.14
ebaysdk 2.1.5
freezegun 0.3.15
gevent 20.9.0
greenlet 0.4.17
idna 2.6
isodate 0.6.1
Jinja2 2.11.2
libsass 0.17.0
lxml 4.6.5
Mako 1.0.7
MarkupSafe 1.1.0
num2words 0.5.6
ofxparse 0.19
packaging 23.1
parse-accept-language 0.1.2
passlib 1.7.1
Pillow 8.1.1
pip 20.0.2
pkg-resources 0.0.0
polib 1.1.0
psutil 5.6.6
psycopg2 2.8.5
pyasn1 0.5.0
pyasn1-modules 0.3.0
pydot 1.4.1
pyparsing 3.0.9
PyPDF2 1.26.0
pyquerystring 1.1
pyserial 3.4
python-dateutil 2.7.3
python-ldap 3.1.0
python-stdnum 1.8
pytz 2023.3
pyusb 1.0.2
qrcode 6.1
reportlab 3.5.55
requests 2.21.0
requests-toolbelt 1.0.0
setuptools 44.0.0
six 1.16.0
soupsieve 2.4.1
urllib3 1.24.3
vobject 0.9.6.1
Werkzeug 0.16.1
wheel 0.34.2
xlrd 1.2.0
XlsxWriter 1.1.2
xlwt 1.3.0
zeep 3.2.0
zope.event 4.6
zope.interface 6.0

Modules installed:
Module Name Latest Version
Sales 14.0.1.0
Invoicing 14.0.1.1
Inventory 14.0.1.1
Purchase 14.0.1.2
Manufacturing 14.0.2.0
Shopfloor 14.0.3.5.0
Shopfloor Base 14.0.2.10.0
Stock Putaway Hooks 14.0.1.0.0
Discuss 14.0.1.0
WMS Accounting 14.0.1.1
Purchase Stock 14.0.1.2
Import/Export Invoices From XML/PDF 14.0.1.0
Import/Export invoices with Factur-X 14.0.1.0
Import/Export invoices with generic UBL 14.0.1.0
Import/Export electronic invoices with UBL/CII 14.0.1.0
Analytic Accounting 14.0.1.1
Signup 14.0.1.0
Two-Factor Authentication (TOTP) 14.0.1.0
TOTPortal 14.0.1.0
Barcode 14.0.2.0
Base 14.0.1.3
Base import 14.0.1.0
Base Many2many Custom Field 14.0.1.1.0
Base Rest 14.0.4.8.3
Initial Setup Tools 14.0.1.0
Sparse Fields 14.0.1.0
IM Bus 14.0.1.0
Components 14.0.1.1.2
Delivery Costs 14.0.1.0
KPI Digests 14.0.1.1
Endpoint route handler 14.0.2.0.1
Email Gateway 14.0.1.0
In-App Purchases 14.0.1.1
IAP / Mail 14.0.1.0
JSONifier 14.0.1.1.0
Australian - Accounting 14.0.1.1
OdooBot 14.0.1.2
Accounting - MRP 14.0.1.0
Manufacturing Expiry 14.0.1.0
Partner Autocomplete 14.0.1.0
Payment Acquirer 14.0.1.0
Fix register payment wizard with 'payment' module 14.0.1.0
Transfer Payment Acquirer 14.0.1.0
Just In Time Scheduling 14.0.1.0
Products & Pricelists 14.0.1.2
Products Expiration Date 14.0.1.0
Product logistics UoM 14.0.1.0.2
Product Manufacturer 14.0.1.0.2
Product Packaging Dimension 14.0.1.0.2
Product Packaging Type 14.0.0.2.0
Purchase and MRP Management 14.0.1.0
Resource 14.0.1.1
Sales 14.0.1.1
Sales and MRP Management 14.0.1.0
Sale Purchase 14.0.1.0
MTO Sale <-> Purchase 14.0.1.0
Sales and Warehouse Management 14.0.1.0
Sales Teams 14.0.1.0
Shopfloor mobile 14.0.1.31.0
Shopfloor mobile 14.0.3.16.0
SMS gateway 14.0.2.1
Snail Mail 14.0.0.3
snailmail_account 14.0.0.1
Stock Helpers 14.0.1.2.0
Stock Move Common Destination 14.0.1.0.0
Warehouse Management: Batch Transfer 14.0.1.0
Stock Picking Completion Info 14.0.1.1.0
Stock Picking Delivery Link 14.0.1.0.0
Stock Picking Progress 14.0.1.2.0
Stock Quant Package Dimension 14.0.2.2.0
Stock Quant Package Product Packaging 14.0.1.1.0
Stock - SMS 14.0.1.0
Stock Storage Type 14.0.1.12.0
Units of measure 14.0.1.0
UTM Trackers 14.0.1.0
Web 14.0.1.0
Web Domain Field 14.0.1.0.2
Web Editor 14.0.1.0
Gauge Widget for Kanban 14.0.1.0
Tours 14.0.0.1

@conroyke56 conroyke56 added the bug Something isn't working label Aug 2, 2023
@simahawk
Copy link
Contributor

simahawk commented Aug 4, 2023

@conroyke56 hi, thanks for your feedback.
Can you reproduce on runboat too?
https://runboat.odoo-community.org/webui/builds.html?repo=OCA/wms&target_branch=14.0

@conroyke56
Copy link
Author

@conroyke56 hi, thanks for your feedback.

Can you reproduce on runboat too?

https://runboat.odoo-community.org/webui/builds.html?repo=OCA/wms&target_branch=14.0

I'm not actually sure how to do that.

But today I spun up a clean install of Odoo 14 from the offical repo. And Odoo 14 from OCB.

Both had the same problem regarding deleting.

Installing every single shop floor module regained some functions with demo data, but still could not delete apps.

Without demo data, had no luck at all installing shop floor examples. They would install, but not be visible or functional.

I'm wondering if there's perhaps some data in the demo that is not present on a clean database.

I'm hoping it's something simple I have overlooked.

I really want to try and build on this app.

@conroyke56
Copy link
Author

conroyke56 commented Aug 4, 2023

@conroyke56 hi, thanks for your feedback. Can you reproduce on runboat too? https://runboat.odoo-community.org/webui/builds.html?repo=OCA/wms&target_branch=14.0

so i think i managed to lo gin to the latest runboat.

create an app. delete the app. get the same error:
Error:
Odoo Server Error

Traceback (most recent call last):
File "/opt/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
result = request.dispatch()
File "/opt/odoo/odoo/http.py", line 696, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo/odoo/http.py", line 370, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo/odoo/http.py", line 358, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/odoo/odoo/http.py", line 919, in call
return self.method(*args, **kw)
File "/opt/odoo/odoo/http.py", line 544, in response_wrap
response = f(*args, **kw)
File "/opt/odoo/addons/web/controllers/main.py", line 1370, in call_kw
return self._call_kw(model, method, args, kwargs)
File "/opt/odoo/addons/web/controllers/main.py", line 1362, in _call_kw
return call_kw(request.env[model], method, args, kwargs)
File "/opt/odoo/odoo/api.py", line 399, in call_kw
result = _call_kw_multi(method, model, args, kwargs)
File "/opt/odoo/odoo/api.py", line 386, in _call_kw_multi
result = method(recs, *args, **kwargs)
File "/opt/odoo-venv/lib/python3.8/site-packages/odoo/addons/endpoint_route_handler/models/endpoint_route_sync_mixin.py", line 84, in unlink
self._unregister_controllers()
File "/opt/odoo-venv/lib/python3.8/site-packages/odoo/addons/endpoint_route_handler/models/endpoint_route_sync_mixin.py", line 101, in _unregister_controllers
self._endpoint_registry.drop_rules(self._registered_endpoint_rule_keys())
File "/mnt/data/odoo-addons-dir/shopfloor_base/models/shopfloor_app.py", line 162, in _registered_endpoint_rule_keys
return [x[0] for x in self._registered_routes()]
File "/mnt/data/odoo-addons-dir/shopfloor_base/models/shopfloor_app.py", line 162, in
return [x[0] for x in self._registered_routes()]
Exception

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

Traceback (most recent call last):
File "/opt/odoo/odoo/http.py", line 652, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo/odoo/http.py", line 317, in _handle_exception
raise exception.with_traceback(None) from new_cause
TypeError: 'EndpointRule' object is not subscriptable

Same error occurs if trying to delete an existing app.

not sure how to test the install of the modules, to see if they all appear, as all the modules are already installed.
But if i remove all the apps, and the shopfloor, rest and endpoint modules, then reinstall the shopfloor mobile app, it appears to show the wms app in the shopfloor with demo data, but not sure how to test on a clean database.

considering the last error appears in runboat, likely clean database install will also have the issue of the apps not appearing.

@simahawk
Copy link
Contributor

simahawk commented Aug 4, 2023

Ok, I'll look into it. Beside this, are you able to use the app once installed?
Bear in mind that - after installing shopfloor_mobile - you should configure profiles, menu items and authentication (user or api key require an additional module shopfloor_mobile_base_auth_*)

@conroyke56
Copy link
Author

Ok, I'll look into it. Beside this, are you able to use the app once installed? Bear in mind that - after installing shopfloor_mobile - you should configure profiles, menu items and authentication (user or api key require an additional module shopfloor_mobile_base_auth_*)

With demo data, after installing shopfloor mobile, the Shopfloor WMS (demo) | wms_demo app is visible in the shopfloor app menu.
In a clean database, the WMS (demo) | wms_demo app does not become visible in the app menu.

the same applies for the shopfloor demo and example modules.
user and api modules installed.
api key assigned.

Copy link

github-actions bot commented Feb 4, 2024

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Feb 4, 2024
@conroyke56
Copy link
Author

Ok, I'll look into it. Beside this, are you able to use the app once installed? Bear in mind that - after installing shopfloor_mobile - you should configure profiles, menu items and authentication (user or api key require an additional module shopfloor_mobile_base_auth_*)

Wondering if you ever tried to replicate this issue?

@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Feb 11, 2024
Copy link

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Aug 11, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

No branches or pull requests

2 participants