Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0034939Openbravo ERP07. Sales managementpublic2017-01-13 09:332017-03-15 20:18
alostale 
alostale 
immediateminorhave not tried
closedfixed 
5
 
3.0PR17Q13.0PR17Q1 
vmromanos
Core
Production - QA Approved
2016-08-29
3.0PR16Q4
https://code.openbravo.com/erp/devel/pi/rev/e3d66eaa40b5 [^]
No
0034939: can't select product in Return from Customer > Insert Orphan Line
When trying to insert an orphan line in a return from customer, it is not possible to select the product: the selector is not displayed.

This is caused by a JS error which prevents the flow to continue:
  
  Uncaught TypeError: Cannot read property 'register' of undefined

  in file cancelAndReplace.js, line:

  OB.EventHandlerRegistry.register(OB.CancelAndReplace.SALES_ORDERLINES_TAB, OB.EventHandlerRegistry.PREDELETE, OB.CancelAndReplace.ClientSideEventHandlersPreDelete.showMessage, 'OBCancelAndReplace_ShowMessage');


The problem is caused because cancelAndReplace.js is loaded within js static resources for classic windows, but the infrastructure it relies on (OB.EventHandlerRegistry) is not causing to fail when tried to be loaded in classic mode.
1. Create a preference 'RM Allow Orphan Line' with value 'Y'
2. Log in again
3. Create a new record in Return from Customer window
4. Click on Insert Orphan line
  -> ERROR:
      * realize it's not possible to select a product as the product selector is not available.
      * JS error can be seen in console
Cancel and Replace is not designed to work in classic mode, so its JS shouldn't be loaded in this case.
No tags attached.
blocks defect 0034938 closed alostale can't select product in Return from Customer > Insert Orphan Line 
Issue History
2017-01-13 09:47alostaleTypedefect => backport
2017-01-13 09:47alostaleTarget Version => 3.0PR17Q1
2017-01-13 09:49alostaleAssigned Toalostale => Triage Finance
2017-01-13 09:49alostaleStatusscheduled => feedback
2017-01-13 09:49alostaleStatusfeedback => new
2017-01-13 10:04hgbotCheckin
2017-01-13 10:04hgbotNote Added: 0093471
2017-01-13 10:04hgbotStatusnew => resolved
2017-01-13 10:04hgbotResolutionopen => fixed
2017-01-13 10:04hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/6398d4e21157f2e64580a955ed56368ea5af1e50 [^]
2017-01-13 10:05alostaleNote Added: 0093472
2017-01-13 10:05alostaleStatusresolved => new
2017-01-13 10:05alostaleResolutionfixed => open
2017-01-17 13:33vmromanosStatusnew => scheduled
2017-01-17 13:33vmromanosAssigned ToTriage Finance => alostale
2017-01-17 13:39hgbotCheckin
2017-01-17 13:39hgbotNote Added: 0093634
2017-01-17 13:39hgbotStatusscheduled => resolved
2017-01-17 13:39hgbotResolutionopen => fixed
2017-01-17 13:39hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/6398d4e21157f2e64580a955ed56368ea5af1e50 [^] => http://code.openbravo.com/erp/backports/3.0PR17Q1/rev/2d974ebf8d1480c1b68b896c4229ccab4c983eef [^]
2017-01-17 13:45vmromanosNote Added: 0093636
2017-01-17 13:45vmromanosStatusresolved => closed
2017-01-17 13:45vmromanosFixed in Version => 3.0PR17Q1
2017-03-15 20:18hudsonbotCheckin
2017-03-15 20:18hudsonbotNote Added: 0095091

Notes
(0093471)
hgbot   
2017-01-13 10:04   
Repository: erp/devel/pi
Changeset: 6398d4e21157f2e64580a955ed56368ea5af1e50
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Jan 13 10:03:39 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/6398d4e21157f2e64580a955ed56368ea5af1e50 [^]

fixed bug 34939: 3.0 selectors cannot be used in classic mode

  When a 3.0 selector was included within classic mode, the JS failed to load.

  The problem was cancelAndReplace.js was included within classic mode JS but it
  depends on resources not available in this mode.

  Because cancel and replace is not designed to work in classic mode, its JS is
  now not included in this mode.

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/ApplicationComponentProvider.java
---
(0093472)
alostale   
2017-01-13 10:05   
reopening: incorrectly marked as fixed due to wrong commit message
(0093634)
hgbot   
2017-01-17 13:39   
Repository: erp/backports/3.0PR17Q1
Changeset: 2d974ebf8d1480c1b68b896c4229ccab4c983eef
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Jan 13 10:03:39 2017 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR17Q1/rev/2d974ebf8d1480c1b68b896c4229ccab4c983eef [^]

Fixed bug 34939: 3.0 selectors cannot be used in classic mode

  When a 3.0 selector was included within classic mode, the JS failed to load.

  The problem was cancelAndReplace.js was included within classic mode JS but it
  depends on resources not available in this mode.

  Because cancel and replace is not designed to work in classic mode, its JS is
  now not included in this mode.

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/ApplicationComponentProvider.java
---
(0093636)
vmromanos   
2017-01-17 13:45   
Code review + testing OK.
Verified Cancel and Replace keeps on working fine.
(0095091)
hudsonbot   
2017-03-15 20:18   
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/54e102bef53e [^]
Maturity status: Test