Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0013807Openbravo ERP01. General setuppublic2010-06-28 14:452012-04-25 16:56
roklenardic 
migueldejuana 
normalminorhave not tried
closedfixed 
5
2.50MP18 
3.0MP11 
Core
No
0013807: Preferences tied to a module
There should be a validation that checks that a preference linked to a module should not be linked to any client, organization, module or user.
Currently, the system allows the user to select any combination of them.

For example:
A preference created within a specific client, also has the Module dropdown automatically selected so when packaging the module, this client preference also gets included inside a module. The problem occurs upon module installation on another computer. Because the module includes a client preference, the preference cannot be inserted because the client does not exist yet. And the client cannot be imported before the module is installed that creates some new fields that are referenced within client_data.xml
No tags attached.
Issue History
2010-06-28 14:45roklenardicNew Issue
2010-06-28 14:45roklenardicAssigned To => adrianromero
2011-06-03 10:59dalsasuaAssigned Toadrianromero => dalsasua
2011-07-20 18:12dalsasuaAssigned Todalsasua => jonalegriaesarte
2012-02-15 19:05iciordiaAssigned Tojonalegriaesarte => vmromanos
2012-03-26 13:51vmromanosAssigned Tovmromanos => alostale
2012-03-26 15:08alostaleAssigned Toalostale => migueldejuana
2012-04-10 17:06migueldejuanaNote Added: 0047433
2012-04-10 17:38hgbotCheckin
2012-04-10 17:38hgbotNote Added: 0047437
2012-04-10 17:38hgbotStatusnew => resolved
2012-04-10 17:38hgbotResolutionopen => fixed
2012-04-10 17:38hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/3e22489cd4898aeb04182a7b115cef6b47e0051d [^]
2012-04-11 09:21hgbotCheckin
2012-04-11 09:21hgbotNote Added: 0047453
2012-04-11 09:25migueldejuanaNote Added: 0047455
2012-04-11 09:25migueldejuanaStatusresolved => new
2012-04-11 09:25migueldejuanaResolutionfixed => open
2012-04-11 13:48migueldejuanaNote Deleted: 0047455
2012-04-11 17:36hgbotCheckin
2012-04-11 17:36hgbotNote Added: 0047490
2012-04-11 17:36hgbotStatusnew => resolved
2012-04-11 17:36hgbotResolutionopen => fixed
2012-04-11 17:36hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/3e22489cd4898aeb04182a7b115cef6b47e0051d [^] => http://code.openbravo.com/erp/devel/pi/rev/cdf58b092e9bb0ab8dbd7daba9c5a1d3f365848a [^]
2012-04-17 05:31hudsonbotCheckin
2012-04-17 05:31hudsonbotNote Added: 0047621
2012-04-17 05:31hudsonbotCheckin
2012-04-17 05:31hudsonbotNote Added: 0047624
2012-04-17 05:31hudsonbotCheckin
2012-04-17 05:31hudsonbotNote Added: 0047629
2012-04-25 16:56marvintmNote Added: 0047965
2012-04-25 16:56marvintmStatusresolved => closed
2012-04-25 16:56marvintmFixed in Version => 3.0MP11

Notes
(0047433)
migueldejuana   
2012-04-10 17:06   
Test Plan:

- Open Preference window.
- Try to create a preference with a module and visibility. (Error)
- Try to create a preference without module and visibility.(Ok)
- Try to create a preference with a module and without visibility. (Ok)

This fix should not be risky.
(0047437)
hgbot   
2012-04-10 17:38   
Repository: erp/devel/pi
Changeset: 3e22489cd4898aeb04182a7b115cef6b47e0051d
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Tue Apr 10 17:29:34 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/3e22489cd4898aeb04182a7b115cef6b47e0051d [^]

Fixed issue 13807: can't create preference for a module and restrict visibility
You cannot create a preference for a module and restrict its visibility at client, organization, role or user level. A constraint has been created to filter this.

---
M src-db/database/model/tables/AD_PREFERENCE.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
---
(0047453)
hgbot   
2012-04-11 09:21   
Repository: erp/devel/pi
Changeset: 3ed91606cbaeb7d29cf9ddfff4cbcaa81daffabe
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Wed Apr 11 09:13:34 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/3ed91606cbaeb7d29cf9ddfff4cbcaa81daffabe [^]

related to issue 13807: backed out previous changeset

Build failed http://builds.openbravo.com/job/int-api/2906/console [^] , inconsistent data because the new check constraint.

Backed out changeset 3e22489cd489

---
M src-db/database/model/tables/AD_PREFERENCE.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
---
(0047490)
hgbot   
2012-04-11 17:36   
Repository: erp/devel/pi
Changeset: cdf58b092e9bb0ab8dbd7daba9c5a1d3f365848a
Author: Miguel de Juana <miguel.dejuana <at> openbravo.com>
Date: Wed Apr 11 17:32:35 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/cdf58b092e9bb0ab8dbd7daba9c5a1d3f365848a [^]

Fixed issue 13807: can't create preference for a module and restrict visibility
You cannot create a preference for a module and restrict its visibility at client, organization, role or user level lower than System.

---
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_VAL_RULE.xml
---
(0047621)
hudsonbot   
2012-04-17 05:31   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/cedf57621434 [^]

Maturity status: Test
(0047624)
hudsonbot   
2012-04-17 05:31   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/cedf57621434 [^]

Maturity status: Test
(0047629)
hudsonbot   
2012-04-17 05:31   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/cedf57621434 [^]

Maturity status: Test
(0047965)
marvintm   
2012-04-25 16:56   
After the validations have been added, if a preference has a module associated with it, the only valid client, org, role and user level will be the "system" ones (System admin role, Openbravo user, Client 0, and org *), which is correct because those exist in all Openbravo instances.