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

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

Contents

Introduzione

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.

Obiettivo

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:

Phinvpre.png


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 Info window and check the "Customization Allowed" field. It will automatically create an Industry Template in your system where customizations will be saved

Modifica della finestra

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

Windowstabsfields.png

Navigate to the 'Field Sequence' tab.

Fieldsequence1.png

Nascondere un campo

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

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:

PhysicalInventory3.png

Ri-sequenza il layout

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

Verticalbutton.png

Save your change. Your window should display:

Physicalinventory4.png

Compilare la finestra

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.

To make generate the script with the changes execute the export.config.script task. Open a command window/shell and go to the Openbravo ERP development project and then execute the following task:

ant export.config.script

See more on build tasks.

Il Risultato

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.

PhysicalInventoryAfter.png


Retrieved from "http://wiki.openbravo.com/wiki/ERP_2.50:Developers_Guide/How_to_change_an_existing_window/it"

This page has been accessed 3,748 times. This page was last modified on 14 June 2011, at 11:04. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.