Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0032671Openbravo ERPA. Platformpublic2016-04-14 18:192016-08-11 18:40
Osmany 
NaroaIriarte 
urgentmajoralways
closedfixed 
30
pi 
3.0PR16Q4 
alostale
Core
No
0032671: Display logic based on property field not working fine after selecting a record in a combo
After of define a property field. We can't use this field for compare with other value in option display logic.
Not working section: Using in display logic in the wiki

http://wiki.openbravo.com/wiki/How_to_use_property_fields [^]

Steps to reproduce in my case:
1-Log into the ERP.
2-Change to role System Administrator.
3-Set to 'Y' the 'in development' field for org.openbravo.retail.config in Module window.
4-Go to 'Windows, Tabs and Fields' window.
5-Search Assortment window. After Product tab.
6-Then add new record in Field window.
  a. Name: Stocked.
  b. Property: product.stocked
  c. Save.
7-Edit Bestseller field.
  a. Display Logic: @inp_propertyField_stocked_IsStocked@=true
  b. Save.
8-Logout and Log into the ERP again. Before you can compile app and restart server
9-Go to Assorment window an select White Valley Group Product List.
10- Go to Product tab and click on create new product in form view.
11- In the product dropdown select "Alpine skiing backpack 27 L" and save the record.
12- Realize that even the product is stocked, the "bestseller" field is not showing, this is not correct.
13- Close the form view and click again in the newly created product to open it in form view again.
14- Realize that now, the "bestseller" field is showing.
15- In the product dropdown, change "Alpine skiing backpack 27 L" for "Gift Card Infinite" and save the record.
16- Realize that the stocked checkbox is unchecked, so the "bestseller" field must not show, but there it is and it is not correct.
17- Close the form view and open again in form view the "Gift Card Infinite" product.
18- Realize that now, the "bestseller" field is not showing.
No tags attached.
Issue History
2016-04-14 18:19OsmanyNew Issue
2016-04-14 18:19OsmanyAssigned To => platform
2016-04-14 18:19OsmanyModules => Core
2016-04-14 18:19OsmanyTriggers an Emergency Pack => No
2016-04-14 19:10caristuNote Added: 0085650
2016-04-14 19:10caristuAssigned Toplatform => Osmany
2016-04-14 19:10caristuStatusnew => feedback
2016-04-14 19:40OsmanyNote Added: 0085654
2016-04-14 19:41OsmanyAssigned ToOsmany => caristu
2016-04-14 19:41OsmanyStatusfeedback => new
2016-04-15 07:55caristuNote Added: 0085655
2016-04-15 07:55caristuAssigned Tocaristu => Osmany
2016-04-15 07:55caristuStatusnew => feedback
2016-04-15 07:56caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=11779#r11779
2016-04-15 07:56caristuNote Edited: 0085655bug_revision_view_page.php?bugnote_id=0085655#r11781
2016-04-15 17:13OsmanyNote Added: 0085682
2016-04-15 17:13OsmanyAssigned ToOsmany => caristu
2016-04-15 17:13OsmanyStatusfeedback => new
2016-04-20 12:51caristuNote Added: 0085776
2016-04-20 12:51caristuNote Edited: 0085776bug_revision_view_page.php?bugnote_id=0085776#r11806
2016-04-20 12:52caristuSummaryProperty field not working fine. => Display logic based on property field not working fine after selecting a record in a combo
2016-04-20 12:53caristuAssigned Tocaristu => platform
2016-06-23 10:09NaroaIriarteAssigned Toplatform => NaroaIriarte
2016-06-27 09:25NaroaIriarteStatusnew => acknowledged
2016-06-29 15:46NaroaIriarteStatusacknowledged => scheduled
2016-07-05 09:02NaroaIriarteSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=12605#r12605
2016-07-05 09:23NaroaIriarteSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=12606#r12606
2016-07-05 09:34NaroaIriarteNote Added: 0088186
2016-07-05 16:10hgbotCheckin
2016-07-05 16:10hgbotNote Added: 0088218
2016-07-05 16:10hgbotStatusscheduled => resolved
2016-07-05 16:10hgbotResolutionopen => fixed
2016-07-05 16:10hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/7eada705cfd9b6fda9e313fb4ad902b049bcc59f [^]
2016-07-07 09:16NaroaIriarteReview Assigned To => alostale
2016-07-08 09:17alostaleNote Added: 0088319
2016-07-08 09:17alostaleStatusresolved => closed
2016-07-08 09:17alostaleFixed in Version => 3.0PR16Q4
2016-08-11 18:40hudsonbotCheckin
2016-08-11 18:40hudsonbotNote Added: 0088990

Notes
(0085650)
caristu   
2016-04-14 19:10   
Are you using the correct name of your property: is it isStocked or isLocked?

- If it is isStocked, try the following: @inp_propertyField_stocked_isStocked@
- If it is isLocked, try the following: @inp_propertyField_stocked_isLocked@
(0085654)
Osmany   
2016-04-14 19:40   
Sorry. In the step 6. The correct is product.stocked. Then the property field is @inp_propertyField_Stocked_isStocked@ = 'Y'.
(0085655)
caristu   
2016-04-15 07:55   
(edited on: 2016-04-15 07:56)
Then, have you tried the following? (note that that column name is in lower case):

@inp_propertyField_stocked_isStocked@

(0085682)
Osmany   
2016-04-15 17:13   
I tried and nothing. Continued the problem.
(0085776)
caristu   
2016-04-20 12:51   
Using an expression like @inp_propertyField_stocked_IsStocked@=true or just @inp_propertyField_stocked_IsStocked@ the display logic works when opening the record in form view.

The issue happens after selecting the record in the combo. Updated issue description.

(0088186)
NaroaIriarte   
2016-07-05 09:34   
It is necessary to save the record to show or hide the field with the display logic because the logic is evaluated in that moment.
(0088218)
hgbot   
2016-07-05 16:10   
Repository: erp/devel/pi
Changeset: 7eada705cfd9b6fda9e313fb4ad902b049bcc59f
Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com>
Date: Tue Jul 05 10:41:20 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/7eada705cfd9b6fda9e313fb4ad902b049bcc59f [^]

Fixed issue 32671: Display logic based on a prop field was not working fine

A field with a display logic based on a property field was not working fine.
In form view, when saving a record, the value of the display logic based on
a property field was not being applied. But if the record was closed and opened
again the values were being correctly shown. This was because when saving the
record clicking the button, the form was not being redrawed.
To fix this the ob-view-form.js has been changed.
Now, when clicking the save button, the form is redrawed and the value of the
field with the display logic is updated.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
---
(0088319)
alostale   
2016-07-08 09:17   
code reviewed + tested
(0088990)
hudsonbot   
2016-08-11 18:40   
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/edaa05b1fb18 [^]
Maturity status: Test