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)
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.
dem.idempiere.com down so tested on local db.
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.
create new table M_Product_v2 & copy fields from M_Product
create new window Product_v2
create tab Product_v2 & select table M_Product
copy tab field from window Product tab Product
change tab table to M_Product_v2
login with GardenAdmin & create new Product in winow Product_v2
Error because the fields related to source table id, but in tab other table
It is necessary to prohibit changing the AD_Tab.AD_Table_ID if there is at least one row AD_Field
Reproduced by in 7.1
create window, tab, fields
copy tab fields from another tab
Error dublicate key
This is right!