Openbravo Issue Tracking System - Retail Modules
View Issue Details
0049544Retail ModulesWeb POSpublic2022-06-13 22:042022-06-23 18:20
axelmercado 
axelmercado 
highmajoralways
closedfixed 
5
RR20Q3.4 
RR20Q3.4 
caristu
No
0049544: Problem in the ExportOrder call with a user containing a role with the "Restrict backend access" check enabled.
An error is generated when making an API call to obtain an order with a user with restricted access to the backend.
1-Generate a role with the following attributes and assign it to a user:
*User Level= Client+Organization
*Check "Is Web Service Enabled" = 'Y'
*Check "Restrict backend access" = 'Y'
*Check "Client Administrator" = 'Y'

2-Send an API call through the following endpoint:
"https://{{OPENBRAVO_URL}}/openbravo/org.openbravo.mobile.core.service.jsonrest/org.openbravo.retail.posterminal.ExportOrder" [^] and the authentication of the user with the role previusly created.

3-If we uncheck "Restrict backend access" the call works correctly, although this should not be a problem.
NOR
related to defect 0044564pi closed ranjith_qualiantech_com Export order works one time, then show an error message 
png example1.png (111,033) 2022-06-15 20:06
https://issues.openbravo.com/file_download.php?file_id=17168&type=bug
png

txt stacktraceerrorapi.txt (4,330) 2022-06-22 19:19
https://issues.openbravo.com/file_download.php?file_id=17217&type=bug
Issue History
2022-06-13 22:04axelmercadoNew Issue
2022-06-13 22:04axelmercadoAssigned To => Triage Platform Conn
2022-06-13 22:04axelmercadoTriggers an Emergency Pack => No
2022-06-13 23:21rafarodaTag Attached: NOR
2022-06-15 10:52caristuNote Added: 0138362
2022-06-15 10:52caristuAssigned ToTriage Platform Conn => Retail
2022-06-15 10:52caristuCategoryRetail API => Web POS
2022-06-15 10:52caristuAssigned ToRetail => axelmercado
2022-06-15 10:52caristuStatusnew => feedback
2022-06-15 11:01caristuRelationship addedrelated to 0048976
2022-06-15 11:35caristuRelationship deletedrelated to 0048976
2022-06-15 20:06axelmercadoNote Added: 0138385
2022-06-15 20:06axelmercadoFile Added: example1.png
2022-06-16 16:12axelmercadoStatusfeedback => new
2022-06-16 16:13axelmercadoAssigned Toaxelmercado => Retail
2022-06-16 16:55caristuNote Added: 0138436
2022-06-16 16:55caristuAssigned ToRetail => axelmercado
2022-06-16 16:55caristuStatusnew => feedback
2022-06-22 19:19axelmercadoNote Added: 0138652
2022-06-22 19:19axelmercadoFile Added: stacktraceerrorapi.txt
2022-06-22 19:19axelmercadoStatusfeedback => new
2022-06-23 12:46caristuNote Added: 0138695
2022-06-23 12:46caristuStatusnew => feedback
2022-06-23 13:38axelmercadoNote Added: 0138696
2022-06-23 13:38axelmercadoStatusfeedback => new
2022-06-23 13:39axelmercadoNote Added: 0138697
2022-06-23 13:48caristuNote Added: 0138699
2022-06-23 13:48caristuStatusnew => feedback
2022-06-23 16:54axelmercadoNote Added: 0138703
2022-06-23 16:54axelmercadoStatusfeedback => new
2022-06-23 18:20caristuReview Assigned To => caristu
2022-06-23 18:20caristuNote Added: 0138712
2022-06-23 18:20caristuStatusnew => closed
2022-06-23 18:20caristuResolutionopen => fixed
2022-06-23 18:20caristuRelationship addedrelated to 0044564

Notes
(0138362)
caristu   
2022-06-15 10:52   
Reassigning it to the Retail team as this is the ExportOrder web services exposed by the posterminal module.

Apart from this could you provide the stack trace of the error that you are receiving? I'm not able to reproduce the problem in an standard environment.
(0138385)
axelmercado   
2022-06-15 20:06   
I attach an image of the error.
(0138436)
caristu   
2022-06-16 16:55   
Can't you provide the error stack trace from the log? That would help to identify the root cause of the error, because that message seems not to be coming from the standard sources.
(0138652)
axelmercado   
2022-06-22 19:19   
I attach a stacktrace with the error
(0138695)
caristu   
2022-06-23 12:46   
In pi that stack trace is not followed because of the following fix[1], that prevents reaching the part of the code which is throwing the exception.

Is that fix present in the environment where the problem is reproduced?

[1] https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/c9c8815d52435b521dd1805c532c71bc99dd5d34 [^]
(0138696)
axelmercado   
2022-06-23 13:38   
I checked it and they don't have that patch
(0138697)
axelmercado   
2022-06-23 13:39   
We reproduce the error in a pristine in client version
(0138699)
caristu   
2022-06-23 13:48   
Can you please confirm that by applying the patch[1] the problem gets fixed?

[1] https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/c9c8815d52435b521dd1805c532c71bc99dd5d34 [^]
(0138703)
axelmercado   
2022-06-23 16:54   
I applied the patch and it works
(0138712)
caristu   
2022-06-23 18:20   
Already fixed by 0044564