Reference Types in Openbravo

Reference is the way a field or column is presented to the User. For the list of references supported by Openbravo, refer here. These are mainly bundled inside the WAD. I have presented a basic overview of few references that could be of more use.

Amount:

This reference is used when we want to represent currency values. Different countries will have different currency representations. For instance, Indian representation of currency will have two decimal places. This can be configured in format.xml file. Once this is configured, the decimal places will be globally affected for all the amount fields.

Price:

Price and Amount references are almost same. Only difference is we cannot give the minimum and maximum range for the field when it is Price References.

Button:

Button Reference is used when we want to execute a process. Either a Dal process or a stored procedure can be attached to a button. This can be done by defining the process in Reports and Process.

DateTime:

DateTime reference is used to capture the time in hh:mm:ss format. The validation for hours,minutes and seconds are already done in the reference.

ID:

ID refers to the primary key field of the Table. This is set up by Openbravo. It uses the Tablename_ID notation to find out what is the primary key for the table.

Image:

Images are saved in the AD_Image table in Openbravo. You can refer to the Images saved there, as a dropdown field here. i.e only the name of the image will come in the dropdown.

ImageBLOB:

When you want to display an image in a field, this datatype is used. For more information on setting Images in Openbravo, refer here. The images will be displayed as follows.

Link:

The Link reference is used when you want to refer to an external link from Openbravo, or to any link within Openbravo. You can navigate to the link using the button provided at the end of the field.

List:

Presents a list of predefined values as a dropdown. This list can be configured in the Reference Window using the System Administrator role.

TableDir:

TableDir is the abbreviation for TableDirect. In essence, it points out to the foreign key referenced here. For eg., if you refer a field called ad_image_id, Openbravo identifies by itself that there is a table by the name ad_image and pulls all the values of that table and provides as a dropdown in this field. The values that appears in the dropdown is the field that was set as identifier in that Table. Note that, the field name has to be the exact primary column name of the referenced table. There is a small issue with regards to this, which is discussed here.

Table:

Table reference is similar to TableDir, but here the name of the referenced field need not be the same as the corresponding ID field of the referred Table. Also in some cases using Table references allows us to add extra filtering conditions to the column. A table reference created for Client is provided below. Even this is configured in the reference window using the System Administrator role.

We can also add our own references in addition to the references provided. Some examples are presented here and here.

Would be happy to hear comments and questions.

Advertisements

About Pandeeswari Ramakrishnan
Applications Engineer, Openbravo

3 Responses to Reference Types in Openbravo

  1. Pingback: Displaying Images in Openbravo « Fugo Consulting

  2. Pingback: Radio Button Reference for Openbravo « Fugo Consulting

  3. Pingback: Resolving runtime model error in Openbravo « Fugo Consulting

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: