Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0051490
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminoralways2023-01-29 00:132024-05-29 04:55
ReporterjlopezView Statuspublic 
Assigned ToTriage Platform Base 
PrioritynormalResolutionopenFixed in Version
StatusnewFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0051490: Error while adding the tree node: Entity ADTree may only have instances with organization *

DescriptionWhen a module containing a table defined as a tree is first installed (for example, Commercial Operations), the node tree (ADTree) does not exist. If an attempt is made to create a record in that table with a user whose context organization is other than *, it displays the following error:

Error
Saving failed. Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1; statement executed: update AD_Tree set AD_Client_ID=?, AD_Org_ID=?, Created=?, CreatedBy=?, Updated=?, UpdatedBy=?, IsActive=?, Name=?, Description=?, TreeType=?, IsAllNodes=?, AD_Table_ID=? where AD_Tree_ID=?

The error occurs because when trying to build the tree, it can only be instantiated with organization * and the organization you are trying to use is the one in the user context:

ERROR org.openbravo.service.datasource.ADTreeDatasourceService - Error while adding the tree node
org.openbravo.base.exception.OBSecurityException: Entity ADTree may only have instances with organization *
Steps To Reproduce1.- Login in Retail POS2 Modules backoffice in Live Builds
2.- Make sure the organization of the context is different from *
3.- Go to the Commercial Operations window
4.- Create a new record successfully and try to save it
5.- The error will be displayed
Proposed SolutionModify the "createTree" function in org.openbravo.service.datasource.ADTreeDatasourceService so that it generates the tree with organization * by default.
TagsNo tags attached.
Attached Filespng file icon screenshot 2023-01-29 00-06-19.png [^] (76,156 bytes) 2023-01-29 00:13

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0165243)
stencenutme (reporter)
2024-05-29 04:55
edited on: 2024-05-29 04:56

This mistake happens because the user context organization you are trying to use is the only one that can be instantiated while building the tree: http://code.openbravo.com/tools/automation/pi-mobile/rev/e4e055fe43f3a14506828c6e69d3d305c1af7cf7 [^] https://geometrydashwave.com [^]


- Issue History
Date Modified Username Field Change
2023-01-29 00:13 jlopez New Issue
2023-01-29 00:13 jlopez Assigned To => Triage Platform Base
2023-01-29 00:13 jlopez File Added: screenshot 2023-01-29 00-06-19.png
2023-01-29 00:13 jlopez Modules => Core
2023-01-29 00:13 jlopez Triggers an Emergency Pack => No
2024-05-29 04:55 stencenutme Note Added: 0165243
2024-05-29 04:56 stencenutme Note Edited: 0165243 View Revisions


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker