View source | Discuss page | Page history | Printable version   
ADVERTISEMENT
Accounting eLearning Courses
Partnerships
SourceForge.net Logo
Openbravo ERP at SourceForge

SourceForge.net Logo
Openbravo POS at SourceForge

Open Solution Alliance Logo
Openbravo at Open Solutions Alliance

ERP/2.50/Developers Guide/How to change an existing window

Developers Guide

Index


Contents

Introduction

Application elements (windows, tabs and fields) are liable to change repeatedly during the development or maintenance phases of a project. Openbravo ERP is able to cope with these changes because its architecture is suited to iterative development. The definitions of all generated Windows, tabs and fields are stored as metadata in the Application Dictionary (AD).

Changing the window of an existing application is a simple 2 step process comprising of two tasks: AD definition and then WAD generation.

  1. Use Openbravo's declarative UI to make changes to AD definition.
  2. Generate the working application using the Wizard for Application Development (WAD).

The generation process can be performed for the whole application or at a more granular level for individual windows.

Objective

The objective of this how-to is to illustrate how to make changes to existing generated windows in terms of appearance and behavior. The window used in the example is the Physical Inventory window and the changes illustrated will be:

Physical Inventory is a window that belongs to the Openbravo ERP core module. It comprises of:

Before any changes the header tabs has the following appearance:

Image:Phinvpre.png


Image:Bulbgraph.png   NOTE: Through modularity included in 2.50 release you can adapt Openbravo core to your unique needs through external modules, without the need to customize the code. Openbravo strongly recommends this way to highly improve maintenance. In this example, to do changes in the metadata of other module (including core) you have to create an Industry Template, put it in development, make it dependent on the core module and put the core also in development. Its configuration script will hold these changes in an external, decoupled manner so patches can be applied without any risk of conflict. The easiest way to do it is to go to General Setup/Application/System window and check the "Customization Allowed" field. It will automatically create an Industry Template in your system where customizations will be saved

Changing the window

Navigate to the 'Windows, Tabs and Fields' window and select the record for 'Physical Inventory'.

Image:Windowstabsfields.png

Navigate to the 'Field Sequence' tab.

Image:Fieldsequence1.png

Hide a field

Hide the 'Description' field by moving the field from the right panel (displayed) to the left panel (hidden) using the horizontal control buttons.

Image:Horizonatalbutton.png

Save your change. You should now see the following. Alternatively you can control the display of a field through the 'Active' field in the 'Field' tab:

Image:PhysicalInventory3.png

Re-sequence the layout

To change the sequence so that 'Movement Date' becomes the first field displayed use the vertical control buttons.

Image:Verticalbutton.png

Save your change. Your window should display:

Image:Physicalinventory4.png

Compiling the Window

Finally, for the callout to take effect, the window that uses it needs to be recompiled and deployed to Tomcat. If using Eclipse, use the eclipse.compile ant task and enter Product into the dialog that pops up. If manually compiling Openbravo ERP, use the ant compile.development -Dtab='Physical Inventory'

Important note: once the compilation has finished, restart Apache Tomcat server.

See more on build tasks.

The Result

You can see in the resulting window the 'Description' field is no longer displayed and the the 'Movement Date' is the first field displayed. It's as easy as that! No code changes are needed to make these sort of window layout changes.

Image:PhysicalInventoryAfter.png




 How to add a field to a Window Tab |  How to develop a new window 

Retrieved from "http://wiki.openbravo.com/wiki/ERP/2.50/Developers_Guide/How_to_change_an_existing_window"

This page has been accessed 1,132 times. This page was last modified 09:39, 17 September 2009. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.