Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0019338Openbravo ERPA. Platformpublic2011-12-20 12:202011-12-28 04:38
jecharri 
marvintm 
highmajoralways
closedfixed 
5
pi 
3.0MP73.0MP7 
Core
No
0019338: The readonlylogic is not working properly in subtabs
The readonlylogic is not working properly in subtabs.

If you have one read only logic defined in a column that it is in a subtab (Header->tab->subtab) it doesn't work in one case.
As "System Administrator" go to window "Tables and Columns":
-choose the table "c_invoicelinetax" and go to column "Line"
-put "@Processed@='Y'" as "Read Only Logic".

Now go to "Windows,tabs and fields" and select the window "Sales Invoice":
-choose the tab "Line Tax" and change the value of field "UI Pattern" from "Read Only" to "Standard".

Do "ant smartbuild" and restart Tomcat.

Now, as "Group Admin" go to window sales invoice:
-choose one invoice that it is "Completed" and have lines and taxes.
-after select one invoice, go to tab "Lines" and after that to tab "Line Tax"
-you will see that you can edit the field "Line No." and you will not be able to edit.[error.png]
After that return to the tab line and open it in mode Form:
-if you go again to tab "Line Tax" you will see that you can not edit the fields. This is the desired behaviour.[correct.png]
No tags attached.
png error.png (68,410) 2011-12-20 12:20
https://issues.openbravo.com/file_download.php?file_id=4840&type=bug
png

png correct.png (81,118) 2011-12-20 12:20
https://issues.openbravo.com/file_download.php?file_id=4841&type=bug
png
Issue History
2011-12-20 12:20jecharriNew Issue
2011-12-20 12:20jecharriAssigned To => alostale
2011-12-20 12:20jecharriFile Added: error.png
2011-12-20 12:20jecharriModules => Core
2011-12-20 12:20jecharriResolution time => 1327878000
2011-12-20 12:20jecharriFile Added: correct.png
2011-12-20 12:22jecharriSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=2991#r2991
2011-12-21 10:37alostaleAssigned Toalostale => marvintm
2011-12-21 10:39alostaleNote Added: 0043977
2011-12-21 12:10hgbotCheckin
2011-12-21 12:10hgbotNote Added: 0043978
2011-12-21 12:10hgbotStatusnew => resolved
2011-12-21 12:10hgbotResolutionopen => fixed
2011-12-21 12:10hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/222a1f0084c5fc5fff2855d52364159867d97793 [^]
2011-12-21 12:14marvintmNote Added: 0043979
2011-12-22 09:21alostaleNote Added: 0044001
2011-12-22 09:21alostaleStatusresolved => closed
2011-12-22 09:21alostaleFixed in Version => 3.0MP7
2011-12-28 04:38hudsonbotCheckin
2011-12-28 04:38hudsonbotNote Added: 0044040

Notes
(0043977)
alostale   
2011-12-21 10:39   
C_Invoice.Processed column should be marked as stored in session, even doing so the issue can be reproduced.

The problem seems to be FIC is not setting session values for grand parent and above tabs.
(0043978)
hgbot   
2011-12-21 12:10   
Repository: erp/devel/pi
Changeset: 222a1f0084c5fc5fff2855d52364159867d97793
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Wed Dec 21 12:10:00 2011 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/222a1f0084c5fc5fff2855d52364159867d97793 [^]

Fixed issue 19338. When computing session attributes, readonly logic will be considered in addition to display logic

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
---
(0043979)
marvintm   
2011-12-21 12:14   
The issue in this case was that the read only logic was not being considered in the Form Initialization Component, when the session values were being computed.

This meant that in this case, even when the column was marked as Store in Session, its value wasn't returned in the JSON returned by the FIC.

The change done has been to add all the columns used in the read only logic to the session attributes, in addition to the ones used in display logic.

Things which should be verified when reviewing the issue:
- That the readonly logic works (in the example described in the issue, that the field can be modified when the invoice is not processed, and cannot be modified when the invoice is processed).
- That fields with displaylogic which depend on session variables still work correctly (that the field is shown and hidden appropriately depending on its display logic).
(0044001)
alostale   
2011-12-22 09:21   
Verified on pi@d17b74061474
(0044040)
hudsonbot   
2011-12-28 04:38   
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/05d50af83cc8 [^]

Maturity status: Test