Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0006249Openbravo ERP00. Application dictionarypublic2008-11-28 12:052009-04-21 11:06
roklenardic 
alostale 
normalcriticalalways
closedfixed 
20Ubuntu 8.10
2.50alpha-r1 
 
Core
No
0006249: Location reference cannot be used on new tables
When entering a new table belonging to a new module, I could not use the Location reference. After using the Create Columns from DB button, the process correctly detected the Location reference for one of the fields, however it was listed as **Location, with the two asterisks and also the compilation fails.
1) enter a new table into the database
CREATE TABLE bpsc_c_order
(
  bpsc_c_order_id character varying(32) NOT NULL,
  ad_client_id character varying(32) NOT NULL,
  ad_org_id character varying(32) NOT NULL,
  isactive character(1) NOT NULL DEFAULT 'Y'::bpchar,
  created timestamp without time zone NOT NULL DEFAULT now(),
  createdby character varying(32) NOT NULL,
  updated timestamp without time zone NOT NULL DEFAULT now(),
  updatedby character varying(32) NOT NULL,
  issotrx character(1) NOT NULL DEFAULT 'Y'::bpchar,
  documentno character varying(30) NOT NULL,
  c_bpartner_id character varying(32) NOT NULL,
  c_bpartner_location_id character varying(32) NOT NULL,
  CONSTRAINT bpsc_c_order_key PRIMARY KEY (bpsc_c_order_id),
  CONSTRAINT adclient_corder FOREIGN KEY (ad_client_id)
      REFERENCES ad_client (ad_client_id) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION,
  CONSTRAINT adorg_bpsccorder FOREIGN KEY (ad_org_id)
      REFERENCES ad_org (ad_org_id) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION,
  CONSTRAINT cbpartner_bpsccorder FOREIGN KEY (c_bpartner_id)
      REFERENCES c_bpartner (c_bpartner_id) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION,
  CONSTRAINT cbpartnerlocation_bpscsoheader FOREIGN KEY (c_bpartner_location_id)
      REFERENCES c_bpartner_location (c_bpartner_location_id) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION,
  CONSTRAINT bpsc_c_order_isactive_check CHECK (isactive = ANY (ARRAY['Y'::bpchar, 'N'::bpchar])),
  CONSTRAINT bpsc_c_order_issotrx_check CHECK (issotrx = ANY (ARRAY['Y'::bpchar, 'N'::bpchar]))
);

2) create a new module with BPSC as the DB prefix.

3) create a new table, name and db name = BPSC_C_Order

4) use the Create Columns from DB button to create the columns. check the c_bpartner_location_id column to see the reference set to **Location.
No tags attached.
has duplicate defect 0005012 closed alostale Problems with C_LOCATION_ID columns while seting up the AD 
related to backport 0005065 closed alostale Problems with C_LOCATION_ID columns while seting up the AD 
Issue History
2008-11-28 12:05roklenardicNew Issue
2008-11-28 12:05roklenardicAssigned To => rafaroda
2008-11-28 12:05roklenardicsf_bug_id0 => 2355428
2008-11-28 12:05roklenardicRegression testing => No
2008-11-28 12:08alostaleAssigned Torafaroda => alostale
2008-11-28 13:15alostaleNote Added: 0010809
2008-11-28 13:16alostaleSeverityminor => critical
2008-11-28 13:17svnbotCheckin
2008-11-28 13:17svnbotNote Added: 0010810
2008-11-28 13:17svnbotStatusnew => resolved
2008-11-28 13:17svnbotResolutionopen => fixed
2008-11-28 13:17svnbotsvn_revision => 10736
2008-12-10 09:45alostaleRelationship addedhas duplicate 0005012
2009-01-10 17:06rafarodaRelationship addedrelated to 0005065
2009-04-21 11:06psarobeStatusresolved => closed

Notes
(0010809)
alostale   
2008-11-28 13:15   
This problem is not caused by modularity but it is a bug in AD_Table_Import process: for search references it insert the search value directly in the ad_reference_id column and leaves ad_ref_value_id null, it should insert the generic search reference (30) in the first one and the concrete one in the second one.
(0010810)
svnbot   
2008-11-28 13:17   
Repository: openbravo
Revision: 10736
Author: alostale
Date: 2008-11-28 13:17:26 +0100 (Fri, 28 Nov 2008)

fixed bug 0006249: Search references are not properly managed when creating columns from db

---
U trunk/src-db/database/model/functions/AD_TABLE_IMPORT.xml
---

https://dev.openbravo.com/websvn/openbravo/?rev=10736&sc=1 [^]