Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0011719Openbravo ERP00. Application dictionarypublic2009-12-10 10:272010-05-18 21:43
adrianromero 
alostale 
urgentmajorhave not tried
closedfixed 
5
 
 
Core
No
0011719: "Read only logic" does not work for selectors like Products or Business Partners
Trying to set a "Read only logic" behavior for product fields or business partner fields does not work because these fields are edited with the special selectors.
As system administrator, go to Application Dictionary || Tables and Columns
In the header select the table C_INVOICE and find the column C_BPARTNER_ID. Here set the read only logic field to :

@Processed@='Y'

This way the business partner field is read when the invoice has been processed.

As Openbravo Admin create a new invoice and complete it. Notice that the Business Partner field is still editable.
No tags attached.
related to feature request 0011555 closed adrianromero Processed records should be rendered as read only 
related to defect 0011701 closed dbaz Read only logic in Date or Numeric columns doesn't work properly 
related to defect 0011426 closed dbaz Read only logic does not work in check boxes 
has duplicate defect 0012912pi closed alostale Read Only Logic is not working for Invoice Line field of Outsourced tab 
related to defect 00137622.50MP20 closed adrianromero The business partner field on General Setup || Security || User is read only 
Issue History
2009-12-10 10:27adrianromeroNew Issue
2009-12-10 10:27adrianromeroAssigned To => alostale
2009-12-10 10:27adrianromeroRelationship addedrelated to 0011555
2009-12-15 10:20alostaleRelationship addedrelated to 0011701
2009-12-24 18:49dbazNote Added: 0023085
2010-01-05 11:32iciordiaAssigned Toalostale => dbaz
2010-01-05 11:32iciordiaStatusnew => scheduled
2010-01-05 11:32iciordiafix_in_branch => pi
2010-01-06 16:41dbazNote Added: 0023241
2010-01-06 16:41dbazStatusscheduled => feedback
2010-01-14 21:07adrianromeroStatusfeedback => scheduled
2010-01-14 21:07adrianromeroNote Added: 0023458
2010-01-14 22:30dbazNote Added: 0023462
2010-01-14 22:33dbazAssigned Todbaz => alostale
2010-03-09 10:23rafarodaRelationship addedrelated to 0011426
2010-03-09 10:25rafarodaIssue Monitored: rafaroda
2010-04-12 10:13dbazRelationship addedblocks 0012912
2010-04-30 15:11hgbotCheckin
2010-04-30 15:11hgbotNote Added: 0026819
2010-04-30 15:11hgbotStatusscheduled => resolved
2010-04-30 15:11hgbotResolutionopen => fixed
2010-04-30 15:11hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a8e14b6705483fce0e04fb15be1bdd26fdad8566 [^]
2010-05-17 10:13adrianromerofix_in_branchpi =>
2010-05-17 10:13adrianromeroDescription Updatedbug_revision_view_page.php?rev_id=370#r370
2010-05-17 10:13adrianromeroSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=372#r372
2010-05-17 13:11dbazStatusresolved => closed
2010-05-18 00:00anonymoussf_bug_id0 => 3002946
2010-05-18 21:43hudsonbotCheckin
2010-05-18 21:43hudsonbotNote Added: 0027465
2010-06-24 13:04psarobeRelationship addedrelated to 0013762
2011-10-29 21:41psarobeRelationship replacedhas duplicate 0012912

Notes
(0023085)
dbaz   
2009-12-24 18:49   
I think this bug is already fixed with this pushed fix

https://issues.openbravo.com/view.php?id=11701 [^]

http://code.openbravo.com/erp/devel/pi/rev/f6fc1901e0b09c506365b5c0b9ea2ea8492ccb6a [^]

Please confirm that.

Thanks
(0023241)
dbaz   
2010-01-06 16:41   
adrianromero are you still able to reproduce it in a "recent" pi context?
(0023458)
adrianromero   
2010-01-14 21:07   
Tested on pi it still does not work, Read only logic field does not work with business partner fields
(0023462)
dbaz   
2010-01-14 22:30   
For example if we see the source code of
"Sales Management || Transactions || Sales Order || Header "

We see in the <head> the function "readOnlyLogic()" and inside it this:
  readOnlyLogicElement('C_BPartner_ID', (inputValue(document.frmMain.inpprocessed) == 'Y'));

With this we are setting the C_BPartner_ID as readonly. The problem is that this C_BPartner_ID input is the hidden input. The visible input in this particular case is C_BPartner_ID_R

If we manually change the source code and write C_BPartner_ID_R replacing the C_BPartner_ID we see that the readonly is properly done.

So the solution should be, in the backend, establish that for the case that the field is a selector, point directly to the visible input instead of the hidden one.
(0026819)
hgbot   
2010-04-30 15:11   
Repository: erp/devel/pi
Changeset: a8e14b6705483fce0e04fb15be1bdd26fdad8566
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Apr 30 15:11:00 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a8e14b6705483fce0e04fb15be1bdd26fdad8566 [^]

fixed bug 11719: Read only logic does not work for selectors

---
M src-wad/src/org/openbravo/wad/WadUtility.java
M src-wad/src/org/openbravo/wad/controls/WADControl.java
M src-wad/src/org/openbravo/wad/controls/WADList.java
M src-wad/src/org/openbravo/wad/controls/WADSearch.java
---
(0027465)
hudsonbot   
2010-05-18 21:43   
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/a8e14b670548 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/aa11838d5f80 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17380.obx [^]