Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0017249Openbravo ERPA. Platformpublic2011-05-18 16:592011-05-26 07:47
vmromanos 
iperdomo 
urgentmajorrandom
closedinvalid 
20Debian 5.0
 
3.0MP0 
Core
No
0017249: Static JS created outside core (in modules) could not work
For the CIF and NIF validator module, I have created a static JS that is called from a callout. The definition is very simple:

OB.CIFNIF = {};
OB.CIFNIF.showMessage = function(me, message, messageType) {
[continue]

- The CIFNIF object is defined inside our OB object.
- The module has a dependency to Core.

The problem is that the OB.CIFNIF object is created BEFORE the OB one, so the definition is totally wrong.

If I change the module dependency from Core to client.kernel, the OB.CIFNIF object is created after the OB one and it works fine. However this is not the solution because the system should know that each dependency of core should imply a dependency to the client.kernel module

1. Install the CIF NIF validator module >=1.0.2
2. Define the SE_CIFNIF_Validator callout to the taxid column of the c_bpartner table and compile and restart tomcat as usual (optional)
4. Try to login into the application. The loading bar doesn't disappear. Check the JS console output for the error "Uncaught TypeError: Cannot set property 'CIFNIF' of undefined"
No tags attached.
blocks defect 0016484 closed vmromanos Localization Pack: Spain OB3 RC5 - SE_CIFNIF_Validator callout seems not to be working properly 
? org.openbravo.module.cifnifvalidator-1.0.2.obx (14,467) 2011-05-20 11:43
https://issues.openbravo.com/file_download.php?file_id=4060&type=bug
Issue History
2011-05-18 16:59vmromanosNew Issue
2011-05-18 16:59vmromanosAssigned To => iperdomo
2011-05-18 16:59vmromanosModules => Core
2011-05-18 17:01vmromanosRelationship addedblocks 0016484
2011-05-18 17:02iperdomoStatusnew => scheduled
2011-05-18 17:02iperdomofix_in_branch => pi
2011-05-20 11:43vmromanosFile Added: org.openbravo.module.cifnifvalidator-1.0.2.obx
2011-05-25 13:24hgbotCheckin
2011-05-25 13:24hgbotNote Added: 0037427
2011-05-25 13:24hgbotStatusscheduled => resolved
2011-05-25 13:24hgbotResolutionopen => fixed
2011-05-25 13:24hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/4ca58960e91f2e7f5f680ec5834b8458edb55953 [^]
2011-05-25 16:23iperdomoStatusresolved => new
2011-05-25 16:23iperdomoResolutionfixed => open
2011-05-25 16:23iperdomoStatusnew => scheduled
2011-05-25 18:34iperdomoNote Added: 0037455
2011-05-25 18:34iperdomoStatusscheduled => closed
2011-05-25 18:34iperdomoResolutionopen => invalid
2011-05-26 07:47hudsonbotCheckin
2011-05-26 07:47hudsonbotNote Added: 0037556

Notes
(0037427)
hgbot   
2011-05-25 13:24   
Repository: erp/devel/pi
Changeset: 4ca58960e91f2e7f5f680ec5834b8458edb55953
Author: Iván Perdomo <ivan.perdomo <at> openbravo.com>
Date: Wed May 25 13:23:07 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/4ca58960e91f2e7f5f680ec5834b8458edb55953 [^]

Fixes issue 17249: Use known list to build dependency list
Core has a undeclared dependency on client.kernel, client.application,
selector, etc modules.
If a module developed in 2.50 and only depends on core, tries to define a
ComponentProvider for definining a new StaticResource the order of inclusion
fails.

---
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/KernelUtils.java
---
(0037455)
iperdomo   
2011-05-25 18:34   
The way to report messages to the user is using 'MESSAGE' and not using the JavaScript API behind messages.
(0037556)
hudsonbot   
2011-05-26 07:47   
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/728387046be6 [^]

Maturity status: Test