Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0021229 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | major | always | 2012-07-27 10:23 | 2012-09-03 13:21 | |||
Reporter | mirurita | View Status | public | |||||
Assigned To | mtaal | |||||||
Priority | immediate | Resolution | fixed | Fixed in Version | 3.0MP15 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 3ef959ea86a7 | ||||
Projection | none | ETA | none | Target Version | 3.0MP15 | |||
OS | Linux 32 bit | Database | PostgreSQL | Java version | 1.6.0_18 | |||
OS Version | Community Appliance | Database version | 8.3.9 | Ant version | 1.7.1 | |||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | AugustoMauch | |||||||
OBNetwork customer | OBPS | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0021229: Nested tabs built based on a hierarchycal structure of a same table does not work. | |||||||
Description | Using the following table as example, where a project can define which is the parent (c_project_parent_id), the idea is to define a two level tab window. Both tabs are related to the same table = c_project - c_project_parent_id is defined as link to parent column and search reference. When you create a record on the lines it updates the parent record instead of creating a new one. Furthermore, you get an infinity loop on FormInitializationComponent line 1077 setSessionValues(parentRecord, parentTab); Other problems or strange thing is that the @Project.id@ session variable is null. If you check on Chrome Developers tools the request when saving a Contract record on the parent tab the @Project.id@ value is null. (see attached screenshot) But if you do the same in Multiphase Project (linked to same table, c_project) the @Project.id@ contains the uuid of the created project. CREATE TABLE c_project ( c_project_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, "name" character varying(60) NOT NULL, -- --OBTG:NVARCHAR-- c_project_parent_id character varying(32), CONSTRAINT c_project_key PRIMARY KEY (c_project_id), CONSTRAINT c_project_parent FOREIGN KEY (c_project_parent_id) REFERENCES c_project (c_project_id) ) | |||||||
Steps To Reproduce | Scenario I 1) Prepare an workspace the following pi branch with https://code.openbravo.com/erp/devel/pi-contract [^] 2) Go to "Contract" window 3) Create a header record: + Name: parent + Search Key: parent 4) Go to Lines tab and create a child record + Name: child + Search Key: child 5) Click on Save button and realize how the parent recorg gets updated with child information. Scenario II When you fix the first problem, please check the filtering on Lines it's working. 1) Go to "Contract" window 2) Create a header record: + Name: parent + Search Key: parent 3) Go to Lines tab and create a child record + Name: child + Search Key: child 4) Create a header record: + Name: parent2 + Search Key: parent2 5) Go to Lines tab and create a child record + Name: child2 + Search Key: child2 6) Move to Contract tab and select "parent2" record, you should only see the child2 in Lines tab. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ![]() ![]() ![]() | |||||||
![]() |
|
![]() |
|
(0050951) mirurita (viewer) 2012-07-27 15:21 |
This fix is very important for Contract Management project. |
(0051138) hgbot (developer) 2012-08-07 11:53 |
Repository: erp/devel/pi Changeset: 189304df4f4c2b6d245adcd5815ade55fa604562 Author: Augusto Mauch <augusto.mauch <at> openbravo.com> Date: Tue Aug 07 11:52:39 2012 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/189304df4f4c2b6d245adcd5815ade55fa604562 [^] Fixes issue 21229: Parent property of tabs has been fixed It was not possible to create new records in child tabs whose table was the same as its parent tab. This had not been a problem so far because all these tabs were read only or single row, and in both cases it was not possible to add a new record. The bug was located in the getParentProperty method of the OBViewTab class. Now it is taken into account the UIPattern of the tab, so if the tab is not read o nly nor single row, it will be possible to add new lines. --- M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewTab.java --- |
(0051140) mirurita (viewer) 2012-08-07 12:36 |
When deleting any 'Line' record you get the following error: Error deleted object would be re-saved by cascade (remove deleted object from associations): [Project#5C4EBA0A73844C6FB218B1A3D82C6F2F] |
(0051418) hgbot (developer) 2012-08-21 10:06 |
Repository: erp/devel/pi Changeset: 978a3dc1d8c35872ca8158eceb750b512eb7decf Author: Augusto Mauch <augusto.mauch <at> openbravo.com> Date: Tue Aug 21 10:05:02 2012 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/978a3dc1d8c35872ca8158eceb750b512eb7decf [^] Fixes issue 21229: Child records can be deleted If the child tab belongs to the same table than its parent tab, it was not possible to delete records from the child tab. This has been fixed by deleting the record in a separate transaction. --- M modules/org.openbravo.service.json/src/org/openbravo/service/json/DefaultJsonDataService.java --- |
(0051631) mirurita (viewer) 2012-08-29 14:03 |
it is working if you select only one line. but if you do a multiple selection it fails with the same error deleted object would be re-saved by cascade (remove deleted object from associations): [Project#4AD53AC688CD407389CD9DEEE90482AB] |
(0051639) mtaal (viewer) 2012-08-29 16:52 |
Hi Mikel, I uploaded a new diff, can you retry it with this diff? gr. Martin |
(0051647) mirurita (viewer) 2012-08-29 17:56 |
Hi Martin, Tested and working. I'm able to delete multiple contract lines. Mikel. |
(0051648) hgbot (developer) 2012-08-29 18:00 |
Repository: erp/devel/pi Changeset: 3ef959ea86a725daf82f8bfb3d6588845280bc0e Author: Martin Taal <martin.taal <at> openbravo.com> Date: Wed Aug 29 18:00:12 2012 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/3ef959ea86a725daf82f8bfb3d6588845280bc0e [^] Fixes issue 21229 Nested tabs built based on a hierarchycal structure of a same table does not work. Also do flush/clear when deleting multiple records --- M modules/org.openbravo.client.application/src/org/openbravo/client/application/MultipleDeleteActionHandler.java --- |
(0051739) hudsonbot (viewer) 2012-09-01 01:03 |
A changeset related to this issue has been promoted main and to the Central Repository, after passing a series of tests. Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/05b3ea484705 [^] Maturity status: Test |
(0051768) AugustoMauch (administrator) 2012-09-03 13:21 |
Code reviewed and verified in pi@288baadd3b3c |
![]() |
|||
Date Modified | Username | Field | Change |
2012-07-27 10:23 | mirurita | New Issue | |
2012-07-27 10:23 | mirurita | Assigned To | => iperdomo |
2012-07-27 10:23 | mirurita | File Added: Contract parent child error.png | |
2012-07-27 10:23 | mirurita | Modules | => Core |
2012-07-27 10:23 | mirurita | OBNetwork customer | => No |
2012-07-27 10:24 | mirurita | File Added: @Project.id@ value is null.png | |
2012-07-27 13:39 | iperdomo | Assigned To | iperdomo => alostale |
2012-07-27 15:21 | mirurita | OBNetwork customer | No => Yes |
2012-07-27 15:21 | mirurita | Note Added: 0050951 | |
2012-07-27 15:21 | mirurita | Target Version | pi => 3.0MP14 |
2012-07-30 09:33 | AugustoMauch | Target Version | 3.0MP14 => 3.0MP15 |
2012-08-06 09:06 | mirurita | Priority | urgent => immediate |
2012-08-07 09:40 | AugustoMauch | Assigned To | alostale => AugustoMauch |
2012-08-07 11:53 | hgbot | Checkin | |
2012-08-07 11:53 | hgbot | Note Added: 0051138 | |
2012-08-07 11:53 | hgbot | Status | new => resolved |
2012-08-07 11:53 | hgbot | Resolution | open => fixed |
2012-08-07 11:53 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/189304df4f4c2b6d245adcd5815ade55fa604562 [^] |
2012-08-07 12:36 | mirurita | Note Added: 0051140 | |
2012-08-07 12:36 | mirurita | Status | resolved => new |
2012-08-07 12:36 | mirurita | Resolution | fixed => open |
2012-08-07 13:24 | AugustoMauch | Assigned To | AugustoMauch => mtaal |
2012-08-21 10:03 | AugustoMauch | Closed by | => marvintm |
2012-08-21 10:06 | hgbot | Checkin | |
2012-08-21 10:06 | hgbot | Note Added: 0051418 | |
2012-08-21 10:06 | hgbot | Status | new => resolved |
2012-08-21 10:06 | hgbot | Resolution | open => fixed |
2012-08-21 10:06 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/pi/rev/189304df4f4c2b6d245adcd5815ade55fa604562 [^] => http://code.openbravo.com/erp/devel/pi/rev/978a3dc1d8c35872ca8158eceb750b512eb7decf [^] |
2012-08-29 14:03 | mirurita | Note Added: 0051631 | |
2012-08-29 14:03 | mirurita | Status | resolved => new |
2012-08-29 14:03 | mirurita | Resolution | fixed => open |
2012-08-29 16:50 | mtaal | File Added: 21229.diff | |
2012-08-29 16:52 | mtaal | Note Added: 0051639 | |
2012-08-29 17:56 | mirurita | Note Added: 0051647 | |
2012-08-29 18:00 | hgbot | Checkin | |
2012-08-29 18:00 | hgbot | Note Added: 0051648 | |
2012-08-29 18:00 | hgbot | Status | new => resolved |
2012-08-29 18:00 | hgbot | Resolution | open => fixed |
2012-08-29 18:00 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/pi/rev/978a3dc1d8c35872ca8158eceb750b512eb7decf [^] => http://code.openbravo.com/erp/devel/pi/rev/3ef959ea86a725daf82f8bfb3d6588845280bc0e [^] |
2012-09-01 01:03 | hudsonbot | Checkin | |
2012-09-01 01:03 | hudsonbot | Note Added: 0051739 | |
2012-09-03 13:21 | AugustoMauch | Closed by | marvintm => AugustoMauch |
2012-09-03 13:21 | AugustoMauch | Note Added: 0051768 | |
2012-09-03 13:21 | AugustoMauch | Status | resolved => closed |
2012-09-03 13:21 | AugustoMauch | Fixed in Version | => 3.0MP15 |
Copyright © 2000 - 2009 MantisBT Group |