Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0026826Openbravo ERP01. General setuppublic2014-06-10 16:552015-09-01 00:02
maite 
vmromanos 
highminoralways
closedfixed 
5
 
3.0PR15Q1 
AtulOpenbravo
Core
No
0026826: Should not be possible to save Organization header with "Organization type"=Organization and check "Allow period control"= Yes
Should not be possible to save Organization header with "Organization type"=Organization and check "Allow period control"= Yes
1. Run "Initial Organization Setup" process and create organization with type= organization
2. Access Organization window and verify that in FORM mode you are not able to check "allow period control" option
3. Change to GRID mode and realize that you are able to check "allow period control" option, set a calendar and Save record

Same problem with Organization type= Generic
modulescript is required in order to correct inconsistent organization definition already existent
No tags attached.
related to defect 00277753.0PR15Q1 closed vmromanos Improve performance in TruncInvoiceDate and Issue26826_Org_AllowPeriodControl module scripts 
Issue History
2014-06-10 16:55maiteNew Issue
2014-06-10 16:55maiteAssigned To => dmiguelez
2014-06-10 16:55maiteModules => Core
2014-06-10 16:55maiteTriggers an Emergency Pack => No
2014-06-10 16:56maiteRegression date => 2014-08-20
2014-06-10 16:56maiteAssigned Todmiguelez => jonalegriaesarte
2014-06-10 16:56maiteTarget Version => PR14Q3
2014-06-16 16:40jonalegriaesarteResolution time => 1408485600
2014-06-16 16:40jonalegriaesarteRegression date2014-08-20 =>
2014-06-16 16:40jonalegriaesarteAssigned Tojonalegriaesarte => pramakrishnan
2014-06-30 12:32eduardo_ArgalTarget VersionPR14Q3 => PR14Q4
2014-08-12 12:31maiteSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=6258#r6258
2014-08-12 12:31maiteIssue Monitored: networkb
2014-09-29 13:19vmromanosStatusnew => scheduled
2014-09-29 13:19vmromanosAssigned Topramakrishnan => vmromanos
2014-09-29 13:19vmromanosfix_in_branch => pi
2014-09-29 16:12jonalegriaesarteTarget Version3.0PR14Q4 => 3.0PR15Q1
2014-09-30 15:32vmromanosNote Added: 0070559
2014-09-30 15:33vmromanosReview Assigned To => AtulOpenbravo
2014-09-30 15:33vmromanosfix_in_branchpi =>
2014-09-30 15:35hgbotCheckin
2014-09-30 15:35hgbotNote Added: 0070560
2014-09-30 15:35hgbotStatusscheduled => resolved
2014-09-30 15:35hgbotResolutionopen => fixed
2014-09-30 15:35hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/565a19456b2084514aa7123722724b74a15b8b61 [^]
2014-09-30 19:15AtulOpenbravoNote Added: 0070576
2014-09-30 19:15AtulOpenbravoStatusresolved => closed
2014-10-06 17:02vmromanosRelationship addedrelated to 0027775
2014-12-30 23:22hudsonbotCheckin
2014-12-30 23:22hudsonbotNote Added: 0072906
2015-09-01 00:02hudsonbotCheckin
2015-09-01 00:02hudsonbotNote Added: 0079935
2015-09-01 00:02hudsonbotCheckin
2015-09-01 00:02hudsonbotNote Added: 0079936

Notes
(0070559)
vmromanos   
2014-09-30 15:32   
Test plan module script:
1. Before applying the fix, run the following query in the database:
update ad_org set ISPERIODCONTROLALLOWED = 'Y' where ad_org_id = '0'
This will set the Period Control Allowed flag to Y for the 0 organization, which is a wrong configuration
2. Apply the fix to the environment
3. Run ant smartbuild -Dlocal=no
4. Review the module script log and verify the following info message is shown just after the execution of the Issue26826_Org_AllowPeriodControl module script
Updated 1 organizations.
5. Run the following query and verify ISPERIODCONTROLALLOWED = 'N'
select ISPERIODCONTROLALLOWED from ad_org where ad_org_id = '0'
6. Run again ant smartbuild -Dlocal=no
7. Verify no organization has been updated


Test plan functionality:
As group admin:
1. Run "Initial Organization Setup" process and create organization with type= organization
2. Access Organization window
3. Change to GRID mode and realize that you are able to check "allow period control" option, set a calendar and Save record.
4. An error is shown and the record can't be saved
(0070560)
hgbot   
2014-09-30 15:35   
Repository: erp/devel/pi
Changeset: 565a19456b2084514aa7123722724b74a15b8b61
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Tue Sep 30 10:54:06 2014 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/565a19456b2084514aa7123722724b74a15b8b61 [^]

Fixed bug 26826: Allow Period Control invalid for organization type

The Allow Period Control flag is only shown in form view when the organization type is either a legal entity with accounting or a business unit. However the user is able to overwrite the Allow Period Control flag using the grid view, where the display logic doesn't work. This situation can lead the user to set this flag for incorrect organization types, like "Organization" and "Generic".

To fix this issue we have included a validation into the AD_ORG_TRG and we have created a module script that set the Allow Period Control to N when the associated organization type is neither a legal entity with accounting nor a business unit.

---
M src-db/database/model/triggers/AD_ORG_TRG.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
A src-util/modulescript/build/classes/org/openbravo/modulescript/Issue26826OrgAllowPeriodControlData.class
A src-util/modulescript/build/classes/org/openbravo/modulescript/Issue26826_Org_AllowPeriodControl.class
A src-util/modulescript/src/org/openbravo/modulescript/Issue26826_Org_AllowPeriodControl.java
A src-util/modulescript/src/org/openbravo/modulescript/Issue26826_Org_AllowPeriodControl_data.xsql
---
(0070576)
AtulOpenbravo   
2014-09-30 19:15   
Verified
(0072906)
hudsonbot   
2014-12-30 23:22   
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/6525fe229e06 [^]
Maturity status: Test
(0079935)
hudsonbot   
2015-09-01 00:02   
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/880a20775a45 [^]
Maturity status: Test
(0079936)
hudsonbot   
2015-09-01 00:02   
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/880a20775a45 [^]
Maturity status: Test