Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0011864Openbravo ERP01. General setuppublic2009-12-24 09:492010-01-19 01:41
networkb 
rafaroda 
urgentmajoralways
closedfixed 
5
2.50MP9 
2.50MP112.50MP11 
Core
No
0011864: Error when setting access manually to roles
In window Role, setting access manually to role by clicking "Grant Access" button, fails.

Looking at log4j log you get this error:
ERROR org.openbravo.erpCommon.ad_actionButton.InsertAccesData - SQL error in query: INSERT INTO ad_process_ACCESS (ad_process_ACCESS_ID, AD_process_ID, AD_ROLE_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, CREATEDBY, UPDATED, UPDATEDBY, ISREADWRITE ) VALUES (get_uuid(), ?, ?, ?, ?, 'Y', now(), ?, now(), ?, 'Y')Exception:org.postgresql.util.PSQLException: ERROR: llave duplicada viola restricción de unicidad «ad_process_access_un_key»
1. General Setup || Security || Role || Role : create new role with user_level=client+organization and manual=Y
2. Press "Grant access" choosing: module=Warehouse management and access=All
3. Press "Grant access" choosing: module=Procurement management and access=All

you will get the error
No tags attached.
Issue History
2009-12-24 09:49networkbNew Issue
2009-12-24 09:49networkbAssigned To => rafaroda
2009-12-24 10:15psarobePriorityimmediate => urgent
2009-12-24 10:15psarobeStatusnew => scheduled
2009-12-24 10:20psarobeNote Added: 0023050
2010-01-06 17:27hgbotCheckin
2010-01-06 17:27hgbotNote Added: 0023242
2010-01-06 17:27hgbotStatusscheduled => resolved
2010-01-06 17:27hgbotResolutionopen => fixed
2010-01-06 17:27hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/168533e0e5a14d5cabdbc3972520f2a4e9c49a9f [^]
2010-01-06 17:33rafarodaNote Added: 0023243
2010-01-12 09:35sureshbabuNote Added: 0023327
2010-01-12 09:35sureshbabuStatusresolved => closed
2010-01-12 09:35sureshbabuFixed in Version => 2.50MP10
2010-01-13 00:00anonymoussf_bug_id0 => 2930989
2010-01-18 11:35sureshbabuFixed in Version2.50MP10 => 2.50MP11
2010-01-19 01:41hudsonbotCheckin
2010-01-19 01:41hudsonbotNote Added: 0023529

Notes
(0023050)
psarobe   
2009-12-24 10:20   
Hi Rafa,

The reason is that Warehouse management and Procurement management "modules" are sharing the same process/report. I don't know which one so that's the reason why the trigger is launched and this is correct.

So what needs to be done is to identify the process/reports that are present in both modules and after that decide in which module makes sense to remove the report/process and in which one to keep it.

We need to do the same exercise in the rest of the modules to avoid more errors like this.

One more question, How are we configuring those modules in order to decide which new windows have to be inserted when selecting a module?

Gorka did this feature 4 o 5 years ago. Maybe you can ask him
(0023242)
hgbot   
2010-01-06 17:27   
Repository: erp/devel/pi
Changeset: 168533e0e5a14d5cabdbc3972520f2a4e9c49a9f
Author: Rafa Roda Palacios <rafael.roda <at> openbravo.com>
Date: Wed Jan 06 17:26:14 2010 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/168533e0e5a14d5cabdbc3972520f2a4e9c49a9f [^]

Fixes issue 11864 Extra checks added before inserting windows' process buttons and print reports.

---
M src/org/openbravo/erpCommon/ad_actionButton/InsertAcces.java
---
(0023243)
rafaroda   
2010-01-06 17:33   
@Pablo

The problem was in the insertion process that was missing some checks before inserting window's process buttons and print reports. Now in each case of new insertion in the ad_process_access table, there is a proper check done to verify that there does not exist already a record with the same ad_role_id and ad_process_id. This fix made, this error will not be reproduced anymore.
(0023327)
sureshbabu   
2010-01-12 09:35   
Tested, able to create a role with multiple module access and also i can able to login with the user, for which the role as been assigned.
(0023529)
hudsonbot   
2010-01-19 01:41   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/168533e0e5a1 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/7f3a35240cf9 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/obx/core/OpenbravoERP-2.50CI.15846.obx [^]