Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0019644Openbravo ERPA. Platformpublic2012-02-02 18:542012-03-02 15:34
dmitry_mezentsev 
jecharri 
immediatemajoralways
closedfixed 
5
main 
3.0MP8 
Core
No
0019644: Product complete selector does not work properly
For the Sales Transaction windows it filters by default products with Stocked=No while should do with Stocked=Yes.
live.builds.pi / main, default user.

1. New Goods Movement.
2. Create new Line. Go to Product selector and mention that except of the product name there is no any other information associated to it (Storage Bin, Quantities and so on).
3. Open selector and check that Stocked=No filter is applied.
Regression QA
related to defect 00193883.0MP8 closed jecharri Wrong product selector in Work Requirement window 
Issue History
2012-02-02 18:54dmitry_mezentsevNew Issue
2012-02-02 18:54dmitry_mezentsevAssigned To => alostale
2012-02-02 18:54dmitry_mezentsevModules => Core
2012-02-02 18:55dmitry_mezentsevTag Attached: Regression QA
2012-02-02 18:55dmitry_mezentsevRelationship addedrelated to 0019388
2012-02-03 08:17alostaleNote Added: 0044834
2012-02-03 08:45alostaleNote Edited: 0044834bug_revision_view_page.php?bugnote_id=0044834#r3130
2012-02-03 08:45alostaleAssigned Toalostale => jecharri
2012-02-03 10:26hgbotCheckin
2012-02-03 10:26hgbotNote Added: 0044844
2012-02-03 10:26hgbotStatusnew => resolved
2012-02-03 10:26hgbotResolutionopen => fixed
2012-02-03 10:26hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/0c038709d04d9bd5dc58e52f99db94fa09bf0eba [^]
2012-02-03 11:06ioritzCiaNote Added: 0044847
2012-02-03 11:06ioritzCiaStatusresolved => closed
2012-03-02 15:34hudsonbotCheckin
2012-03-02 15:34hudsonbotNote Added: 0045747

Notes
(0044834)
alostale   
2012-02-03 08:17   
(edited on: 2012-02-03 08:45)
The problem was introduced by fix for 0019388 when replacing product selector stocked default property:

     2.7 -<!--FF8080812E77708D012E7796A94B0017--> <DEFAULT_EXPRESSION><![CDATA[if (OB.isSalesTransaction() == true) { true } else { false }]]></DEFAULT_EXPRESSION>
     2.8 +<!--FF8080812E77708D012E7796A94B0017--> <DEFAULT_EXPRESSION><![CDATA[if (OB.isSalesTransaction() === true) { true } else {false} ]]></DEFAULT_EXPRESSION>


This is how isSalesTransactions is evaluated by js engine:

Sales trx
  OB.isSalesTransaction()->true
  if (OB.isSalesTransaction() == true) { true } else {false} ->true
  if (OB.isSalesTransaction() === true) { true } else {false} ->false
Purchase trx
  OB.isSalesTransaction()->false
  if (OB.isSalesTransaction() == true) { true } else {false} ->false
  if (OB.isSalesTransaction() === true) { true } else {false} ->false


Therefore stocked property is always defaulted to false after the fix.

(0044844)
hgbot   
2012-02-03 10:26   
Repository: erp/devel/pi
Changeset: 0c038709d04d9bd5dc58e52f99db94fa09bf0eba
Author: Javier Etxarri <javier.echarri <at> openbravo.com>
Date: Fri Feb 03 10:25:42 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/0c038709d04d9bd5dc58e52f99db94fa09bf0eba [^]

Fixes issue 19644: Product complete selector does not work properly.
I revert the change because with '===' equals is not working as it is expected.

---
M src-db/database/sourcedata/OBUISEL_SELECTOR_FIELD.xml
---
(0044847)
ioritzCia   
2012-02-03 11:06   
Verified.
(0045747)
hudsonbot   
2012-03-02 15:34   
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/544d64e0c159 [^]

Maturity status: Test