Copy Fields from other Tab - related to source table id

Description

problem: copy fields from other tab doesn't update table id properly - still related to source table id. (Copy all Tabs and Fields from other Window - not tested yet)

steps
1. create new table in app. dict
2. create - copy fields from other tab OR Copy all Tabs and Fields from other Window
3. change the ID field to contextual (i have copied payment schedule from order to object2 - so change c_order_id)
4. check how it looks in GUI
5. then go to the application dictionary. BUG >> the table id properly - still related to source table id

test script - how we verify it: select * from ad_column c join ad_table t ON c.ad_table_id=t.ad_table_id where c.ad_column_id=60135

maybe we will need to test it deeply.
norbert

Environment

dem.idempiere.com down so tested on local db.

Activity

Show:
Carlos Ruiz
August 27, 2014, 4:15 PM

Maybe the issue you describe is about changing the table id when there are fields - then the old fields will relate to a different table?

If that's the case then the attached patch could help to solve the issue.
There must be a lot of cases where changing a field on the header table leads to wrong details and I think is recommendable to implement this kind of solutions everytime that can happen, specially on the tenant side.

Anna Fadeeva
May 9, 2020, 9:12 PM
Edited

Test 1

  1. create new table M_Product_v2 & copy fields from M_Product

  2. create new window Product_v2

  3. create tab Product_v2 & select table M_Product

  4. copy tab field from window Product tab Product

  5. change tab table to M_Product_v2

  6. login with GardenAdmin & create new Product in winow Product_v2

  7. Error because the fields related to source table id, but in tab other table

 

Anna Fadeeva
May 9, 2020, 9:24 PM

It is necessary to prohibit changing the AD_Tab.AD_Table_ID if there is at least one row AD_Field

Anna Fadeeva
May 9, 2020, 9:26 PM

Reproduced by in 7.1

Anna Fadeeva
May 9, 2020, 9:31 PM
Edited

Test 2

  1. create window, tab, fields

  2. copy tab fields from another tab

  3. Error dublicate key
    This is right!

 

 

Assignee

Unassigned

Reporter

Norbert Bede

Labels

Tested By

Anna Fadeeva

Components

Fix versions

Affects versions

Priority

Major
Configure