Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
ADempiere 3.6 Cookbook
ADempiere 3.6 Cookbook

ADempiere 3.6 Cookbook: Over 100 recipes for extending and customizing ADempiere beyond its standard capabilities

eBook
R$49.99 R$294.99
Paperback
R$367.99
Subscription
Free Trial
Renews at R$50p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

ADempiere 3.6 Cookbook

Chapter 2. ADempiere Customization Part I

In this chapter, we will cover:

  • Creating a new window

  • Customizing an existing window

  • Creating a window with multiple tabs

  • Creating a search widget

  • Populating a combo-box list

  • Configuring a zoom window

  • Creating a read-only window

  • Creating a read-only tab

  • Creating read-only fields

  • Creating a new menu tree

  • Role setup and assigning menu tree to a role

  • Defaulting the data display to the single/multi row mode

  • Showing the entity and line items on the same tab

Introduction


In this chapter, we are going to look at the overall customization capability of ADempiere. Many of them can be achieved by configuring ADempiere. However, many of them require a combination of customization and configuration. Here we will deal with words like Table, Column, Window, Tab, Field, Process, Model, Validation Rules, and so on and see how to create a new entity of each kind.

To make the topics relevant and have a logical flow, II will be taking a case study and implementing a small module called Minutes Of Meeting (MOM). This module is intended to allow the user to capture the minutes of a meeting and carry out various tasks related to it. As we progress through the recipes, we will cover the concept, its application to the business, how it maps to this MOM case study, and then we would look at what it takes to implement in ADempiere. Going forward, I will be using the following MOM template, as shown in the following screenshot, to map ADempiere capability.

Before...

Creating a new window


A window provides create, read, update, and delete (CRUD) access to the data to a user. These functionalities are provided by the standard tools and menus. A standard layout of a window has the following parts:

  • Title bar

  • Menu bar

  • Tool bar

  • Tabs panel

  • Status bar

The following screenshot shows the different parts:

Given the ADempiere architecture, as an author of a new window, you do not have to worry about how and what gets displayed in the Title, Menu bar, Tool bar, and Status bar. All we need to focus on is the Tabs panel. And, in this recipe, we will go through the steps required to create a complete working new window in ADempiere, which will act as the foundation for building our MOM window.

Getting ready

Connect to the database adempiere360 using adempiere as the user using your favorite PostgreSQL client (for example, phpPgAdmin or pgAdmin III or command based psql)

How to do it...

  1. 1. Create the following table in your adempiere schema:

    CREATE TABLE adempiere...

Customizing an existing window


Practically, there will be a situation when we will have to make changes to the existing screens. For example, label change, data type change, logically grouping the fields, and so on. In this recipe, we will take our newly created MOM window and we will customize it further to understand the process involved in customizing an existing window.

In the previous recipe, our window had a Start Date, Start Time, and End Time. All of them display both the date and time. Now, say, we want to achieve the following:

  • Start Date displays only the date

  • Start Time and End Time displays only the time

  • Start Time and End Time shall appear in the same line

Given this customization need, let us see how we can achieve it.

How to do it...

  1. 1. Log in as System/System with the System Administrator role.

  2. 2. Click on the Menu | Application Dictionary | Table and Column menu. This pops up the lookup window and prompts for table details. Enter the details to find the MOM related table.

  3. 3...

Creating a window with multiple tabs


It is pretty common to logically relate the information using tabs. This recipe describes the steps to add multiple tabs in a window. So far, we have our basic MOM window. Now, we will break it into multiple tabs:

  • The Participants detail is moved to a new tab—Participants

  • The Discussion detail is refined and we are going to capture the following information as part of every discussion item:

    • Item number

    • Discussion description

    • Actioned by

    • Status

      This is also moved to a new tab—Discussion Detail

Getting ready

Connect to the database adempiere360 using adempiere as a user using your favorite PostgreSQL client (for example, phpPgAdmin or pgAdmin III or command based psql).

How to do it...

  1. 1. Delete the records from the c_mom table.

  2. 2. Delete the menu—Minutes Of Meeting.

  3. 3. Related to MOM, delete the following from the Window, Tab, and Field windows, as per the order mentioned:

    • Field(s)

    • Tab

    • Window

  4. 4. Related to MOM, delete the following from the Table and Column...

Creating a search widget


On the MOM tab, we have the Chairperson field where we are entering the username. Similarly, we have the participant's name on the Participants tab and the Actioned By person name on the Discussion Detail tab. ADempiere maintains User/Contact detail. To provide a better finishing of our MOM window, it would be good if we can connect these fields with ADempiere's User/Contact so that a user can find the right User/Contact and assign them to a MOM. This way, all these fields need to be made like a search widget where a Search button appears next to these fields. When a user clicks on the Search button, he/she will be able to find the User/Contact, and upon selection, the selected User/Contact will appear in the field. As part of this recipe, we will follow through the steps required to convert each of these fields into a search widget.

Getting ready

Drop the adempiere.c_mom_participantsline table by executing the following SQL:

DROP TABLE adempiere.c_mom_participantsline...

Populating the combo-box list


There is a Status field on the Discussion Detail tab. Currently, this field accepts free text. For various practical reasons, such as, to maintain the consistency in communication, to support project guidelines, to have clean data for further analysis and reporting, and so on, it makes sense to convert the Status field into a combo-box and the possible values are listed for the user selection. In this recipe, we will follow the steps to convert the Status field into a combo-box and configure it in such a way that it is populated with values.

Getting ready

Drop the status column by executing the following SQL:

ALTER TABLE c_mom_discussionline DROP COLUMN status;

How to do it...

  1. 1. Create a new table, c_momstatus, to capture the list of status values by executing the following SQL:

    CREATE TABLE adempiere.c_momstatus
    (
    c_momstatus_id numeric(10) NOT NULL,
    ad_client_id numeric(10) NOT NULL,
    ad_org_id numeric(10) NOT NULL,
    isactive character(1) NOT NULL DEFAULT 'Y':...

Configuring a zoom window


In the previous recipe, we created a c_momstatus table and created a column, c_momstatus_id, in the c_mom_discussionline, which has a foreign key relationship with the c_momstatus table. This is a useful detail in the context of the Zoom window, as ADempiere automatically generates a link (called hyperlink in the web version) and when we click on the link, the system takes us to the linked window, which is called zooming in ADempiere. This is useful when you are on a window and quickly jump on to another window, which is linked through one of the fields to look at more details. However, there are some other details that need to be configured before it starts working and this recipe will cover these details.

How to do it...

Say, we want to zoom to the MOM Status table when a user clicks on the MOM Status link on the Discussion Detail table. With this in perspective, the following are the steps:

  1. 1. Log in as System/System with the System Administrator role.

  2. 2. Go to...

Creating a read-only window


In contrast, there will be situations where a user is required to only look at the details and not required to create the record. For example, a customer service representative only requires view permission on most of the data so that they can answer customer enquiries effectively. This recipe describes how we can create a read-only window.

How to do it...

To demonstrate, I have taken the MOM Status window. However, you may apply the same steps to your Minutes Of Meeting window.

  1. 1. Log in as System/System with the System Administrator role.

  2. 2. Go to the Window, Tab, and Field window and look for the MOM Status window.

  3. 3. Change the Window Type to Query Only and save it, as shown in the following screenshot:

  1. 4. Log out and log in as GardenAdmin/ GardenAdmin with the GardenWorld Admin role.

  2. 5. Go to the MOM Status window. System will show you the list and the New Record button will be disabled, as shown in the following screenshot:

Creating a read-only tab


Sometimes there may be a need where not the complete window should be made read-only. Rather, a particular tab needs to be made read-only. For example, there is a user who, as per their role, shall capture the payments against an invoice. He/she should not be allowed to create an invoice in the system. To address this need, we can have a window where one tab is to capture the payment detail and another one showing the outstanding invoices, which we will make read-only. This way, on the single window, the user will be able to refer to the outstanding invoices and at the same time receive payments towards them.

In our MOM case study, Let us say we want to add a rule that states only an admin user shall be allowed to edit the discussion items of an MOM. Let us see how we can do this.

How to do it...

  1. 1. Log in as System/System with the System Administrator role.

  2. 2. Go to the Window, Tab, and Field window and look for the Minutes Of Meeting window.

  3. 3. Go to the Discussion...

Creating read-only fields


Another situation is where neither a window is read-only nor is the tab. It is there that we want to make a few fields read-only on a tab. For example, on our MOM window, the Client and Organisation fields need to be read-only as they are populated, by default, based on the logged in user's details and does not require any modification. This recipe describes the steps to achieve this.

How to do it...

  1. 1. Log in as System/System with the System Administrator role.

  2. 2. Go to the Window, Tab, and Field window and look for the Minutes Of Meeting window.

  3. 3. Select the target tab on Tab and go to the Field tab.

  4. 4. Check the Read Only checkbox for the Client field, as shown in the following screenshot:

  1. 5. Repeat the same for Organisation and any other field that you want to be read-only.

  2. 6. Log out and log in as GardenAdmin/ GardenAdmin with the GardenWorld Admin role.

  3. 7. Go to the Minutes Of Meeting window. Editing will not be allowed for all the fields we marked as read-only...

Creating a new menu tree


As part of the customization, we may build windows and may want to keep them logically grouped. For example, in ADempiere, we have Quote-to-Invoice where everything related to the sales is grouped. Let us say we want to group all our MOM-related windows under a node MOM in the Menu tree so that they are all in one place. Here we will look into the procedure to create such a menu structure.

How to do it...

  1. 1. Log in as System/System with the System Administrator role.

  2. 2. Go to Menu | System Admin | General Rules | System Rules | Menu.

  3. 3. Click on the New Record button to create a new menu and fill in the details, as shown in the following screenshot:

  • Check the Summary Level to create a folder entry in the Menu tree to which further menus can be added. If the Summary Level is not checked, the newly created menu will be added a leaf node to the Menu tree.

  1. 4. Go to Menu | System Admin | General Rules | System Rules | Tree Maintenance and select Menu from the Tree drop-down...

Role set up and assigning a menu tree to a role


By default, to every role in ADempiere, we see a Menu tree, which shows the items that the role has access to. It is imperative that, for a role, we may have to build an altogether different menu tree. For example, a sales representative in an organization requires access to Quote-to-Invoice. In that case, that role shall see only the Quote-to-Invoice node in its Menu tree.

Let us say, in our MOM example, there is a user role, which only needs to work with the MOM-related windows. To such a role, we would like to ensure that only the MOM node appears in their Menu tree. This recipe provides us with the required details to implement our requirement.

How to do it...

  1. 1. Log in as System/System with the System Administrator role.

  2. 2. Go to the Menu | System Admin | General Rules | System Rules | Tree window.

  3. 3. Click on New Record and fill in the required details. For Type | Area, select Menu, as shown in the following screenshot:

  1. 4. Click on the Verify...

Defaulting the data display to single/multi-row mode


By default, ADempiere shows data in a window in multi-row mode, where it shows multiple records in a tabular format. It allows complete data entry in the tabular form, as well. However, in many instances, it is more logical and convenient to show the window as a form to allow easy understanding and filling of the data. Irrespective of the default mode, using the Grid Toggle toolbar button, a user can switch between these two modes. However, from a usability perspective, many a times, it makes sense to show the window as a form or as a table. For example, if the workflow says that a user has to always create the data in the system, it is more appropriate to provide the single-row mode (window is shown as a form) of the window to that user. Whereas, if the workflow requires the user to create the data (only if it does not exist in the system), it is more appropriate to show the window in the multi-row mode (tabular representation). This...

Showing the entity and line items on the same tab


On our MOM window, we have MOM, Participants, and Discussion Detail tabs. Let us say we think it would be better if Participants information is displayed on the first tab, MOM. This way, one can quickly find out who all attended the meeting, if that is the only interest they have in this window. Here we will go through the steps required to have a tab included inside another tab.

How to do it...

  1. 1. Add a new column to the adempiere.c_mom table by executing the following SQL:

    ALTER TABLE adempiere.c_mom ADD COLUMN tab_participants numeric(10);
    
  2. 2. Go to the Table and Column window and generate the new column from the database table, as shown in the following screenshot:

  1. 3. Go to the Window, Tab, and Field window and generate the new field.

  2. 4. Verify the field sequence. Usually, we would like to keep these kinds of things at the end, as shown in the following screenshot:

  1. 5. Go to the Field tab and select Participants from the Included Tab drop-down...

Left arrow icon Right arrow icon

Who is this book for?

If you want to easily implement ADempiere in your organization, this book is for you. This book will also be beneficial to system users and administrators who wish to implement an ERP system. Only basic knowledge of ADempiere is required. This cookbook will build on that basic knowledge equipping you with the intermediate and advanced skills required to fully maximize ADempiere. A basic knowledge of accounting and the standard business workflow would be beneficial.

What you will learn

  • Install ADempiere from the ground up so you are ready to get up and running Customize ADempiere to suit your business needs Configure Web Services for ADempiere Integrate shopping carts such as Webstore, VirtueMart, and PayPal Develop reports with ADempiere Create new payment methods such as Interest Free Credit Analyze data using graphs, charts, and statistical reporting tools Acquire real-time shipping data and import it into the ADempiere shipment module Merge mail with Open Office and Star Office Integrate with e-mail clients such as Mozilla Thunderbird

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Mar 15, 2011
Length: 332 pages
Edition :
Language : English
ISBN-13 : 9781849513388
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Mar 15, 2011
Length: 332 pages
Edition :
Language : English
ISBN-13 : 9781849513388
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
R$50 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
R$500 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just R$25 each
Feature tick icon Exclusive print discounts
R$800 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just R$25 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total R$ 980.97
Compiere 3
R$272.99
ADempiere 3.4 ERP Solutions
R$339.99
ADempiere 3.6 Cookbook
R$367.99
Total R$ 980.97 Stars icon
Banner background image

Table of Contents

10 Chapters
Preparing the Ground Chevron down icon Chevron up icon
ADempiere Customization Part I Chevron down icon Chevron up icon
ADempiere Customization Part II Chevron down icon Chevron up icon
Web services Chevron down icon Chevron up icon
VirtueMart Integration Chevron down icon Chevron up icon
JasperReports with ADempiere Chevron down icon Chevron up icon
PayPal Integration Chevron down icon Chevron up icon
Equifax Integration Chevron down icon Chevron up icon
Mondrian Integration for Analysis Chevron down icon Chevron up icon
E-mail Integration with Mozilla Thunderbird Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.5
(2 Ratings)
5 star 50%
4 star 50%
3 star 0%
2 star 0%
1 star 0%
Joel Stangeland Jul 28, 2011
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I've been implementing Adempiere and it's parent Compiere in US companies since 2004. Packt sent me an advance review copy of this book, and I consider it excellent. I would consider this Cookbook a must for any new developer or IT resource that will work with System Administration of Adempiere.One of the most powerful aspects of Adempiere as business framework is the ability to extend and customize the application to local needs. The first 150 pages of this Cookbook cover the customization tools of the Application Dictionary that are available through the user interface. With this book as a reference, a System Admin can add Windows and fields, combo boxes with context specific content, searches and printouts.The remainder of the Cookbook is dedicated to code extensions, such as e-commerce integrations, credit card processing, and business intelligence. While I am not a developer myself, I know that the learning curve for developers has always been steep, and having this kind of documentation along with examples is a huge head start.Thanks to Ajit and Packt for making this excellent reference available.Regards,Joel StangelandCEO AdaxaUSA[...]
Amazon Verified review Amazon
Piero Berritta Jun 08, 2011
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Adempiere 3.6 Cookbok is an essential but complete manual for specialists, developers, and integrators of Adempiere Open Source ERP. The book focuses exclusively on the extension and customization capabilities of Adempiere ERP software, completely leaving out the basic configuration aspects. The topics are covered in a succinct but comprehensive way, embracing several Adempiere ERP integration aspects: web services, Jasper Report, PayPal integration, Mondrian BI.A book /manual for specialists, complete, practical and well illustrated, for professional integration of this unique ERP.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.