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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0034382
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] StoreServermajorhave not tried2016-11-03 17:412016-12-27 10:37
ReporterplujanView Statuspublic 
Assigned Tomtaal 
PrioritynormalResolutionfixedFixed in Version
StatusclosedFix in branchFixed in SCM revisionb430f51aa085
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionmainSCM revision 
Review Assigned ToAugustoMauch
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0034382: [RR16Q4] Trying to install a module in the Central and the Stores throws a "duplicated key" error

DescriptionWhen installing "Gift Cards" module using the backend's Module Management window, in the Central and the Stores at the same tiem, an error is shown:

In the Central:
Error: The outgoing batch Store2-37994 failed: ERROR: duplicate key value violates unique constraint "ad_window_access_un_key" Detail: Key (ad_role_id, ad_window_id)=(E717F902C44C455793463450495FF36B, 059C75147CC74DBCB85D04FEA1AEF24A) already exists.

The problem seems to be related to the automatic roles and the creation of the permissions for accessing the new window added by the module.
Steps To Reproduce1. In a MultiServer layout of 1 Central and 2 stores, as System Admin in all the machines, go to Module Management window and install the Gift Cards module.
2. Start the three rebuild processes. You will get the error described above in the Central.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0036919 closedAugustoMauch Entries of ad_form_access related with the mobile warehouse form should be exported/synchronized 

-  Notes
(0091753)
hgbot (developer)
2016-11-22 17:43

Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: 9597d4aa995b9c50bba1f2c0bdeb5a731489cd65
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Tue Nov 22 17:40:54 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/9597d4aa995b9c50bba1f2c0bdeb5a731489cd65 [^]

Fixes issue 34382: Tables used to give access to UI components are not synced

The following tables are no longer being synchronized:
-OBUIAPP_Process_Access
-AD_Tab_Access
-AD_Table_Access
-AD_Form_Access
-obuiapp_view_role_access
-AD_Window_Access
-AD_Process_Access
-AD_Field_Access
-OBUIAPP_NAVBAR_ROLE_ACCESS
-OBKMO_Widget_Class_Access

They have been removed because:
- The reference tables from the AD dataset. If new module is installed in the Central Server, some of those tables are automatically populated and if they were synchronized there would be referencial integrity errors in the targe database because the referenced record does not exist.
- Those who are populated automatically will be also created in the store server when the module is installed there
- The operation in the store server backend will be restricted by default.

---
M src-db/database/sourcedata/STRSYNC_SYNCHRONIZEDTABLE.xml
---
(0092017)
mtaal (manager)
2016-12-02 11:07

Reviewed
(0092033)
mtaal (manager)
2016-12-02 13:50

We should also remove these tables from the initial store server creation dataset
(0092038)
mtaal (manager)
2016-12-02 14:52

In addition, webpos uses a special form with id: B7B7675269CD4D44B628A2C6CF01244F. See here [1]

to control access to webpos the ad_form_access records with this form id should be replicated to the store server, also when doing initial store server creation.


[1]
https://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/file/0a11f64c44f9/src/org/openbravo/retail/posterminal/JSONProcessSimple.java#l12 [^]
(0092053)
hgbot (developer)
2016-12-02 20:32

Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization
Changeset: b430f51aa0858cacd68b9fed1e2be38aa4692b63
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Fri Dec 02 20:31:50 2016 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/b430f51aa0858cacd68b9fed1e2be38aa4692b63 [^]

Fixes issue 34382: [RR16Q4] Trying to install a module in the Central and the Stores throws a "duplicated key" error
Remove tables (see below) from the store server creation dataset. Replicate/initial-create only the form_access of
the WebPOS form as this defines access to the webpos client.

Tables removed from the store server create dataset:
-OBUIAPP_Process_Access
-AD_Tab_Access
-AD_Table_Access
-AD_Form_Access
-obuiapp_view_role_access
-AD_Window_Access
-AD_Process_Access
-AD_Field_Access
-OBUIAPP_NAVBAR_ROLE_ACCESS
-OBKMO_Widget_Class_Access

AD_Form_Access is added back with a new whereclause

---
M src-db/database/sourcedata/AD_DATASET_TABLE.xml
M src-db/database/sourcedata/STRSYNC_CUSTOM_ROUTER.xml
M src-db/database/sourcedata/STRSYNC_SYNCHRONIZEDTABLE.xml
A src/org/openbravo/retail/storeserver/synchronization/router/FormAccessRouter.java
---
(0093011)
AugustoMauch (manager)
2016-12-27 10:37

Code reviewed and verified

- Issue History
Date Modified Username Field Change
2016-11-03 17:41 plujan New Issue
2016-11-03 17:41 plujan Assigned To => StoreServer
2016-11-03 17:41 plujan Triggers an Emergency Pack => No
2016-11-21 11:54 mtaal Assigned To StoreServer => AugustoMauch
2016-11-22 17:42 AugustoMauch Review Assigned To => mtaal
2016-11-22 17:43 hgbot Checkin
2016-11-22 17:43 hgbot Note Added: 0091753
2016-11-22 17:43 hgbot Status new => resolved
2016-11-22 17:43 hgbot Resolution open => fixed
2016-11-22 17:43 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/9597d4aa995b9c50bba1f2c0bdeb5a731489cd65 [^]
2016-12-02 11:07 mtaal Note Added: 0092017
2016-12-02 11:07 mtaal Status resolved => closed
2016-12-02 11:07 mtaal Fixed in Version => RR17Q1
2016-12-02 13:50 mtaal Assigned To AugustoMauch => mtaal
2016-12-02 13:50 mtaal Note Added: 0092033
2016-12-02 13:50 mtaal Status closed => new
2016-12-02 13:50 mtaal Resolution fixed => open
2016-12-02 13:50 mtaal Fixed in Version RR17Q1 =>
2016-12-02 14:52 mtaal Note Added: 0092038
2016-12-02 20:32 hgbot Checkin
2016-12-02 20:32 hgbot Note Added: 0092053
2016-12-02 20:32 hgbot Status new => resolved
2016-12-02 20:32 hgbot Resolution open => fixed
2016-12-02 20:32 hgbot Fixed in SCM revision http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/9597d4aa995b9c50bba1f2c0bdeb5a731489cd65 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/b430f51aa0858cacd68b9fed1e2be38aa4692b63 [^]
2016-12-03 01:01 mtaal Review Assigned To mtaal => AugustoMauch
2016-12-27 10:37 AugustoMauch Note Added: 0093011
2016-12-27 10:37 AugustoMauch Status resolved => closed
2017-09-21 17:17 AugustoMauch Relationship added related to 0036919


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker