You are on page 1of 4

Openbravo Advanced Development

Chapter 1 - Introduction and Concepts
v3.0.2 © 2008-2012 Openbravo S.L.U. All rights reserved. The information in this document is confidential and may not be disseminated or disclosed to third parties (either in digital form or on paper) without the prior written consent of Openbravo S.L.U.

Introduction Prerequisites Main Development Concepts Openbravo Architecture (Client vs. Server Side Development) Hotel Scenario Introduction Entities E/R Diagram Window Functionality Window Customizations Additional Functionality

Introduction
Before diving deep into Openbravo coding and discussing advanced framework elements it is important to understand some of the architectural concepts that Openbravo 3 is based on.

Prerequisites
Before partaking this course we expect you to already be familiar with most topics covered by the Basic Technical Training such as: ● Installation and Deployment ● Modularity ● Basics of the Application Dictionary ● Initial Client Setup ● Roles and Users ● Reporting ● Alerts ● Widgets ● Development Process ● Packaging Prior to proceeding, please read the following article to adopt the terminology we will be using during this course: http://wiki.openbravo.com/wiki/Prerequisite_Knowledge .

Main Development Concepts
Glance through the following article to learn some basics about Openbravo development: http:// wiki.openbravo.com/wiki/Main_Development_Concepts

Openbravo Architecture (Client vs. Server Side Development)
As you may have noticed the backend (data manipulation and business logic) and the frontend (the client UI) are strongly decoupled in Openbravo 3. The first is developed mostly in Java whereas the second one is in Javascript using the Smartclient library. You will notice that the sequence of chapterS in this course follows this separation, starting with backend development such as:

the problem needs to be specified first. Please read the following article before proceeding: http://wiki. database structures defined and window functionality described. Entities The following entities are new to existing Openbravo 3 functionality: ● Guest that can tie to a Business Partner to whom an invoice can be issued ○ Custom Identifier such as a unique number for each guest ○ First name ○ Last name ○ Business Partner .default rate for a walk-in guest ○ Type .● ● ● ● ● ● DB development Action handlers Callouts Background processes Webservices etc.date of the check-out ○ Room Rate . B or C) ● Room ○ Number ○ ARate . the whole course revolves around development of a miniature Hotel Management module.sum calculated upon checkout based on the number of nights stayed and the rate used E/R Diagram .Y/N ● Stay . As in a real life situation. B or C) ○ Final Sum .rate for guests that have stayed for more than 5 nights within the last 6 months ○ CRate .com/wiki/Openbravo_3_Architecture Hotel Scenario Introduction To make development exercises easier to understand and more realistic.link to an existing Business Partner to whom the invoice will be issued ○ Guest Rate . In the end.openbravo.date of the check-in ○ Planned Nights .daily rate the guest is entitled to (fixed list of options: A.preplanned booking of a number of nights ○ Date Out .rate for regular guests that have stayed for more than 10 nights within the last 6 months ○ BRate .Single/Double/Suite ○ Smoking .an overnight stay of a particular guest in a room ○ Date In .the room rate used for a stay (A. followed by the client development: ● Toolbar ● Manual Views/Screens ● etc. we want a clear deliverable in a form of a packaged module that can be distributed or installed at a client's site.

move the Comments field up so that it will be located just after the Email field Additional Functionality The following additional functionality should be developed: ● the option to recalculate room rates for guests with a click of one button ● have a background process that recalculates room rates for all guests every night ● provide a read-only webservice that displays currently available rooms according to criteria ● alert about guests who have overstayed their booking . Therefore.Window Functionality To support the functionality indicated by the structures above. Final Sum should be automatically calculated ● Room: ○ manage the list of rooms with their properties Window Customizations Our hotel application will also use the existing Business Partner window but requires less functionality than is originally provided by Openbravo 3. of Employees ● Within [Contact]. this is allowed and the changes made will be exported as an XML file called a configuration script. The following changes are required: ● Activate these tabs: ○ [Withholding] ○ [Product Template] ● Within the main [Business Partner]. display these fields: ○ Valuation ○ Potential Customer ○ No. this configuration script will also be included. we will cut down the tabs and some fields of this existing window. Upon exporting and packaging the module. this way changing the core. we will require two windows: ● Guest/Stay ○ Guest header tab ■ manage guests ■ Identifier needs to be automatically generated but can be changed upon entry of a new guest ■ the Rate field must be read-only to all users except the ones with the Manager role ■ have a button that enables recalculation of the guest's rate based on their stays within the last 6 months ○ Stay child tab ■ Room dropdown should only list available rooms ■ Room field should not be updatable ■ Final Sum field should not be visible until the Date Out is entered ■ Upon entering Date Out. Because our module is a template.

● ● ● do an automatic checkout upon checking into another room be able to check out a guest using a toolbar button display a monthly overview of room stays/bookings .