View source | Discuss this page | Page history | Printable version   

Assetsmanagement/Advanced Asset Management/Parent View

In order to implement the parent view in the assets management project, this will be the approach:
Make Assets Management dependent on generic tree report module

Contents

Improve Generic Tree Report module

  1. Add two additional (and optional) fields:
    1. Sequence number column:
      1. will make possible for the user to choose any of the columns belonging to the table to be shown in the report
      2. if null, current behavior
      3. if a numeric column of the table to show is selected, nodes of the tree to be printed are shorted accordingly to this value (in ascendant order).
    2. Root node:
      1. will show all the elements in the table (using the ad_column_identifier function)
      2. if null, current behavior
      3. if one element of the table is chosen here by the user, the report will show the tree, starting from this node: instead of showing the whole tree for all the elements in the table, it will just show the portion of tree which root element is the one chosen here

Improve Assets Management module

This is the way Parent View are configured:

An asset have got this values:

So, for example, in order to implement this assets configuration:

This will be the configuration:

Asset Is Summary Parent View Main Asset
Camera Yes
Lens No Strong Camera
Protective Case No Casual Camera

Two objectives must be achieved with this development:

  1. Develop the content of the Parent View sub-tab in asset card window
  2. Configure assets management module to show (using generic tree report) the hierarchy configured for a concrete asset

Content of the Parent View sub-tab

This tab must show all the assets (including the one in asset sub-tab) involved in the hierarchy. For example, for the previous example, in all the three assets (Camera, lens and case) the content of the parent view sub-tab will have same content: will show (in grid mode, by default) the three elements, with these values:

Asset Relationship
Camera Main Asset
Lens Strong
Protective Case Casual

If user clicks on the print button, it will launch the report in generic tree report, providing all the needed information: table, column for summary, column for parent and root element. The output will be something like:

DB

A new view must be created to show all the assets related to the one given. Some SQL like the next one must be implemented:

select son.issummary, son.mainasset, son.parentview from aam_asset parent, aam_asset son where parent.aam_asset_id = son.mainasset and (parent.aam_asset_id=? or son.aam_asset_id=?)
(being ? -> the AAM_ASSET_ID of the parent tab)

The view created must be the one populating the sub-tab Parent View. Default view will be grid. Print button will launch a process that will launch the generic tree report function, providing the required values.

Retrieved from "http://wiki.openbravo.com/wiki/Assetsmanagement/Advanced_Asset_Management/Parent_View"

This page has been accessed 1,327 times. This page was last modified on 19 August 2010, at 12:04. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.