Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0013977Openbravo ERP00. Application dictionarypublic2010-07-15 17:042022-02-01 08:08
networkb 
Triage Platform Base 
highminoralways
scheduledopen 
5
2.50MP19 
 
Core
No
0013977: problem when adding a "DocumentNo" field in a table from an external module
If you want to add a "DocumentNo" field in a table allocated in another different module, the application does not recognize it as "DocumentNo" (due to needed name "EM_PREFIX_DocumentNo") and does not generate the sequence associated (as it does when you create a "DocumentNo" field in a table of your module)
1. Create new module "in development", depending of core and set a DB Prefix for it (PREFIX)
2. In Database: add new column in a_amortization table called "EM_PREFIX_DocumentNo"
3. In AD Amortization table add a new column and choose recently created "EM_PREFIX_DocumentNo". Set ApplicationElement=DocumentNo
4. In AD Amortization window, go to Header tab and press "Create Field" button to add your new field.
5. ant smartbuild
6. Access to Amortization window and realize that your new DocumentNo field does not work as a normal "DocumentNo" field, as it has not been recognized by the application

Usually when you add a "DocumentNo" field to a table of you module using name DocumentNo (instead of EM_PREFIX_DocumentNo) a sequence associated is generated
Modify selectDocumentsNo in Fields_data.xsql to support "EM_*_DocumentNo"
No tags attached.
related to feature request 0009016 scheduled Triage Platform Base When a column is added in a table in different module (EM_Module_Column) its reference is TableDir by default 
Issue History
2010-07-15 17:04networkbNew Issue
2010-07-15 17:04networkbAssigned To => alostale
2010-07-19 08:24alostaleStatusnew => scheduled
2010-07-29 12:25alostaleRelationship addedrelated to 0009016
2010-07-29 12:25alostaleTypedefect => feature request
2010-07-29 12:25alostaleTarget Version2.50MP21 =>
2010-07-29 12:27alostaleNote Added: 0029663
2010-08-27 09:38networkbProposed Solution updated
2012-01-03 12:12egoitzNote Added: 0044099
2017-04-10 14:38alostaleAssigned Toalostale => platform
2022-02-01 08:08alostaleAssigned Toplatform => Triage Platform Base

Notes
(0029663)
alostale   
2010-07-29 12:27   
This issue is similar to 0009016

It will be fixed as a feature request.

Meanwhile the workaround is to create the sequence manually.
(0044099)
egoitz   
2012-01-03 12:12   
Posible solution:

MOdify the file

src-wad/src/org/openbravo/wad/Fields_data.xsql

On selectDocumentsNo method

replace
     and ad_column.columnname = 'DocumentNo'
with
     and ad_column.columnname = 'DocumentNo' OR ad_column.columnname like 'EM_%_DocumentNo'