Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0040321
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajoralways2019-03-05 16:002019-03-08 11:11
ReportervmromanosView Statuspublic 
Assigned Tojarmendariz 
PrioritynormalResolutionno change requiredFixed in Version
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tojarmendariz
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0040321: Create Columns from DB not working fine with views

DescriptionIt seems the process is not working fine for views and only when called from the UI. However it seems to work when called directly from the database (ad_table_import or ad_table_import0).
Steps To ReproduceCreate the following view directly in PostgreSQL:
CREATE OR REPLACE VIEW c_mytest AS
 SELECT l.c_orderline_id c_mytest_id, l.ad_client_id as AD_CLIENT_ID, l.ad_org_id as AD_ORG_ID, l.isactive as ISACTIVE,
        l.created as CREATED, l.createdby as CREATEDBY, o.updated as UPDATED, l.updatedby as UPDATEDBY,
        o.c_bpartner_id, o.datePromised, o.m_warehouse_id, o.documentno,
        l.m_product_id, l.qtyOrdered - l.qtyDelivered as pendingToDeliverQty, l.c_uom_id
 FROM C_Order o
 JOIN C_OrderLine l on (o.c_order_id = l.c_order_id)
 WHERE o.issotrx = 'Y'
 AND o.docstatus = 'CO'


Login as System Admin in Openbravo.
Go to Module window and set Core as indevelopment.
In Tables And Columns window enter a new record for the view c_mytest and fill the necessary fields.
Set View flag, unset Deletable Records [NICE TO HAVE: this flag should be automatically unset for views].
Press the Create Columns from DB. An error is raised informing about missing columns.

Now in PG run and write down the output:
select ad_pinstance_id from ad_pinstance order by created desc limit 1;

Now run:
select ad_table_import0(<previous ad_pinstance_id>) from dual;

Verify the process is completed successfully.

Go back to the Tables and Columns window, search the previously created record.
Verify the Columns are properly inserted.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to feature request 0040341 newTriage Platform Base When selecting "View" checkbox in Table Window, "Deletable Records" should be automatically unselected 

-  Notes
(0110311)
jarmendariz (developer)
2019-03-08 11:11

I reproduced this issue by creating the View using the "postgres" user instead of "tad". For this reason, the c_mytest view cannot be accesed via backoffice but the column generation procedure works as expected in the console.

To make this work, just execute the following after creating the view:

alter table c_mytest
  owner to tad;

- Issue History
Date Modified Username Field Change
2019-03-05 16:00 vmromanos New Issue
2019-03-05 16:00 vmromanos Assigned To => platform
2019-03-05 16:00 vmromanos Modules => Core
2019-03-05 16:00 vmromanos Triggers an Emergency Pack => No
2019-03-07 13:51 jarmendariz Assigned To platform => jarmendariz
2019-03-07 13:51 jarmendariz Status new => acknowledged
2019-03-08 11:01 jarmendariz Relationship added related to 0040341
2019-03-08 11:02 jarmendariz Status acknowledged => scheduled
2019-03-08 11:11 jarmendariz Review Assigned To => jarmendariz
2019-03-08 11:11 jarmendariz Note Added: 0110311
2019-03-08 11:11 jarmendariz Status scheduled => closed
2019-03-08 11:11 jarmendariz Resolution open => no change required


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker