Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajoralways2012-07-27 10:232012-09-03 13:21
ReportermiruritaView Statuspublic 
Assigned Tomtaal 
PriorityimmediateResolutionfixedFixed in Version3.0MP15
StatusclosedFix in branchFixed in SCM revision3ef959ea86a7
ProjectionnoneETAnoneTarget Version3.0MP15
OSLinux 32 bitDatabasePostgreSQLJava version1.6.0_18
OS VersionCommunity ApplianceDatabase version8.3.9Ant version1.7.1
Product VersionSCM revision 
Review Assigned ToAugustoMauch
Web browser
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo

0021229: Nested tabs built based on a hierarchycal structure of a same table does not work.

DescriptionUsing 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 session variable is null.
If you check on Chrome Developers tools the request when saving a Contract record on the parent tab the value is null. (see attached screenshot)
But if you do the same in Multiphase Project (linked to same table, c_project) the 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 ReproduceScenario I
1) Prepare an workspace the following pi branch
 with [^]
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.
TagsNo tags attached.
Attached Filespng file icon Contract parent child error.png [^] (71,979 bytes) 2012-07-27 10:23

png file icon value is null.png [^] (144,527 bytes) 2012-07-27 10:24

diff file icon 21229.diff [^] (888 bytes) 2012-08-29 16:50 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
mirurita (developer)
2012-07-27 15:21

This fix is very important for Contract Management project.
hgbot (developer)
2012-08-07 11:53

Repository: erp/devel/pi
Changeset: 189304df4f4c2b6d245adcd5815ade55fa604562
Author: Augusto Mauch <augusto.mauch <at>>
Date: Tue Aug 07 11:52:39 2012 +0200
URL: [^]

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/
mirurita (developer)
2012-08-07 12:36

When deleting any 'Line' record you get the following error:
deleted object would be re-saved by cascade (remove deleted object from associations): [Project#5C4EBA0A73844C6FB218B1A3D82C6F2F]
hgbot (developer)
2012-08-21 10:06

Repository: erp/devel/pi
Changeset: 978a3dc1d8c35872ca8158eceb750b512eb7decf
Author: Augusto Mauch <augusto.mauch <at>>
Date: Tue Aug 21 10:05:02 2012 +0200
URL: [^]

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/
mirurita (developer)
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]
mtaal (developer)
2012-08-29 16:52

Hi Mikel,
I uploaded a new diff, can you retry it with this diff?

gr. Martin
mirurita (developer)
2012-08-29 17:56

Hi Martin,

Tested and working. I'm able to delete multiple contract lines.

hgbot (developer)
2012-08-29 18:00

Repository: erp/devel/pi
Changeset: 3ef959ea86a725daf82f8bfb3d6588845280bc0e
Author: Martin Taal <martin.taal <at>>
Date: Wed Aug 29 18:00:12 2012 +0200
URL: [^]

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/
hudsonbot (developer)
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: [^]

Maturity status: Test
AugustoMauch (developer)
2012-09-03 13:21

Code reviewed and verified in pi@288baadd3b3c

- Issue History
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:24 mirurita File Added: value is null.png
2012-07-27 13:39 iperdomo Assigned To iperdomo => alostale
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 => [^]
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 [^] => [^]
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 [^] => [^]
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
Powered by Mantis Bugtracker