Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0007680Openbravo ERP00. Application dictionarypublic2009-02-19 13:182009-03-18 11:03
roklenardic 
alostale 
highmajoralways
closedduplicate 
20Ubuntu 8.10
pi 
 
Core
No
0007680: New Columns cannot be added with EM_XXX prefix
Imagine you add a new column to the M_ProductPrice database table following the guidelines on http://wiki.openbravo.com/wiki/Projects/Modularity/Developers_Guide#Table_and_column [^]

ALTER TABLE m_productprice ADD COLUMN em_howto_calculate_average_price CHARACTER(1) NOT NULL DEFAULT '';

Our custom module is a template in development with the DB Prefix defined as HOWTO.

When trying to enter this new column into the Table and Column for the M_ProductPrice table, I cannot add it with DB COlumn Name = 'EM_HOWTO_Calculate_Average_Price' since I get a red alert 'ERROR: Names must start with its module's DB prefix'.

I thought about saving it as a 'HOWTO_Calculate_Average_Price' hoping that the application will figure the EM_ part out considering this particular new field is part of a custom template. I am able to save then but the compilation fails saying:
...
    [java] 1007 [main] INFO org.openbravo.data.Sqlc - File: ../srcAD/org/openbravo/erpWindows/Product/Accounting_data.xsql processed
        [java] 1097 [main] INFO org.openbravo.data.Sqlc - File: ../srcAD/org/openbravo/erpWindows/Product/Price_data.xsql processed
        [java] org.postgresql.util.PSQLException: ERROR: column m_productprice.howto_calculate_average_price does not exist
        [java] at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1548)
...

obviously not finding the specified column since it starts with EM_ as specified in the guidelines.

Is the error in the guidelines or the application?
Modularity
duplicate of defect 0007623pi closed alostale Columnname check is not following the modularity rules 
Issue History
2009-02-19 13:18roklenardicNew Issue
2009-02-19 13:18roklenardicAssigned To => rafaroda
2009-02-19 13:18roklenardicRegression testing => No
2009-02-24 11:53rafarodaTag Attached: Modularity
2009-02-24 11:53rafarodaAssigned Torafaroda => alostale
2009-02-24 11:53rafarodaPrioritynormal => high
2009-02-24 11:53rafarodaStatusnew => scheduled
2009-02-24 12:00alostaleRelationship addedduplicate of 0007623
2009-02-24 12:00alostaleStatusscheduled => closed
2009-02-24 12:00alostaleDuplicate ID0 => 7623
2009-02-24 12:00alostaleResolutionopen => duplicate
2009-03-18 11:03anonymoussf_bug_id0 => 2691410

There are no notes attached to this issue.