View source | Discuss this page | Page history | Printable version   
Toolbox
Main Page
Upload file
What links here
Recent changes
Help

PDF Books
Add page
Show collection (0 pages)
Collections help

Search

How to add a field to a Window Tab

Objective

The objective of this how-to is to show how you can add a new field to a tab in Openbravo ERP.

It is closely the related to the previous How to add Columns to a Table HowTo which showed how to add new columns to a table.

In that previous HowTo the following three new columns were added to the ht_salary table.

  1. ValidTo, a simple date-field matching the ValidFrom date already present in this table
  2. Payment Schedule, shown as a combobox to the user to be able to choose from three values defined in a list-reference.
    1. First day of the month
    2. Mid of the month
    3. Last day of the month
  3. Payment Category, a link to another existing table which allows selecting among the values present in that table.

The task of adding those new columns to the existing Employee Salary window which was create in this other HowTo is now faily simple as most of the work (like defining references, element) has been already done when adding the columns to the table.

In this HowTo we will place the new fields in the module with dbprefix HT2 which already contains the new columns.

Add the fields to the window

The process to add new fields to an existing window is the same like adding fields to a new (empty) window. Going to Application Dictionary || Window, Tabs and Fields we need to search for the Employee Salary window. Then for that window mark its Salary tab.

Now we use the Create Fields process on this tab to let it add all columns of the underlying ht_salary table to this tab if they've not been previously added.

This will then add three new fields to the tab matching the three new columns and automatically place those three fields into the module with prefix HT2.

The next step is to configure those new fields a bit to get a more pleasing layout:

After this change the list of columns should look similar to the following screenshot:


WindowAddField1.png


As a last step the Synchronize Terminology process should be run to synchronize our newly added fields to the elements created for the columns they are based on so that the UI labels for the new fields get the names defined in those elements.

If this window should also be used in classic UI mode then now ant smartbuild should be execute to compile the changed window.

To see the changed in the new UI just switch role away from the System Administrator role used for this HowTo and go to the changed window to see it having the new field like shown here:


WindowAddField2.png

Retrieved from "http://wiki.openbravo.com/wiki/How_to_add_a_field_to_a_Window_Tab"

This page has been accessed 16,334 times. This page was last modified on 11 July 2011, at 14:28. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.