Copyr i ght ( C) 2009 Redhuan D. Oon ERP Appl i r at i on Set up and Oper at i on1Chapter 1 - Install ApplicationLearning ObjectivesBy the end of this chapter, the student shall be able to:1.Identify the online resources needed for the installation of the ERP Suite;2.Download all the resources;3.Setup each resource according to its requirements;4.Ensure the properties are correctly set;5.Go through the ERP Application process;6.Launch succcessfully the ADempiere ERP.Copyr i ght ( C) 2009 Redhuan D. Oon ERP Appl i r at i on Set up and Oper at i on1IntroductionIn order for the software to run in your server or PC, or notebook PC, the necessarysoftwares has to be present in your environment. You have to ﬁrst download them fromthe internet. You have to practice downloading and installing each software as fromtime to time their steps or processes may be changed. Usually they become easier aseach new version is published. Some of the latest versions may not be compatible withthe whole suite. Usually we use the common versions in use about 3 months to 1 yearfrom its publication date to ensure that they are most stable with the rest of the suitesoftwares.Installing a new software is the ﬁrst most challenging task for a beginner. At times it isstill daunting for a seasoned practitioner. It can be approached in a fun way, acceptingthe challenge as a learning process of discovery. I will encourage you to make learningnotes to not only improve this content but also share with the community that can earnyou some dimes in your kudo-bank.Copyr i ght ( C) 2009 Redhuan D. Oon ERP Appl i r at i on Set up and Oper at i on2Resources List

ResourcePurposeGuruSomeone whom you have to pay to tell you the time.HardwareSpecifications of Equipment you need, coffee not in-cluded.SoftwareList of software that is still free the last time we checked.GuideThis coursebook is what will help you through the setup.Minimal Hardware Requirements

ItemMinimalPurposeCPUDuo Core Processor orequivalent.Higher core processingMemory2 gigabytes RAMMore caching that increase speedHarddisk3 partitions of 10 gigabyteseach.Convenient management of sepa-rate locations of OS, App and DBWireless or LANStandard for ADSL broad-bandFor web access and communica-tions.Copyr i ght ( C) 2009 Redhuan D. Oon ERP Appl i r at i on Set up and Oper at i on1Lesson Plan According To Platform

WindowsLinuxSubjectLESSON1.2Installer1.81.1Installing Java and Postgres1.41.3Installing ADempiere1.51.5RUN_Setup App1.71.6ImportAdempiere (metadata)1.9Running App Server1.1ORunning ADempiereWhat Is Your Operating System?•Is it Linux? Or Windows? Or Apple Mac? Different OS (operating system) will meanyou have to select different version of the software you will be downloading.•We know that most of you will be having Windows. But there is a way to make yourwindows system to dual boot into Linux and switch to the FOSS stack:•For those who are used to Microsoft Windows and the installer style there is a toolcontributed by Kai Schaeffer of Germany. Please ﬁnd that at topic1.8 Windows In-staller.https://help.ubuntu.com/community/WindowsDualBootCopyr i ght ( C) 2009 Redhuan D. Oon ERP Appl i r at i on Set up and Oper at i on21.1 FOSS StackThe following list is the FOSS stack needed for the complete ERP system to work on aserver PC. It is more for the Linux based platform. This is for a total FOSS stack wherethe user need not pay a single cent of licensing. But this can be technically difﬁcult fornewbies.Software List

http://www.java.com/getjava/Java helps run the ERP software.It is in between the ERP and thecomputer.version 6 for linuxPostgreSQLhttp://www.postgresql.org/download/PG is the database system. Itstores all the dynamic informa-tion of the ERP.Linux version 8ADempierehttp://sourceforge.net/project/showfiles.php?group_id=176962&package_id=207834

AD is the ERP application. Itruns on Java.version 3.5.3aThe list above shows the latest version in use at date of writing. It will change withtime. However the links are quite dynamic with its latest info. It is good to avoid too oldor too new versions that is incompatible.•So we are basing our installation on Linux, Ubuntu ﬂavour is known to be the easiestand dead easy. Here is the link for an Ubuntu installation guide:https://help.ubuntu.com/community/InstallationAsia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on11.2 Windows StackYou can follow the software list above for Java, Postgres and ADempiere. Choose theWindows version. For ADempiere it is the ﬁle that ends in .zip.An online guide to follow for installing ADempiere on a Windows platform is:COMPUTER NAME MUST BE EASYEnsure that your computer name is a short and easy name to type and not a long ma-chine name as it will be constantly repeated in the installation setup and certain systemoperations. An easy name is easier to recall when needed.http://www.adempiere.com/wiki/index.php/Adempiere_Install_WinXpAsia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on21.3 Installing Java, PostgreSQL and ADempiereWe can obtain and install Java and Postgres direct from the Web too. Issue the followingcommand in your Ubuntu terminal:Enter ‘root’ password for sudo, and answer ‘yes’.It will most likely install the following. To see what is there for Postgres you use the‘grep’ command.The next page is another way to install Java and Postgres.Asia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on3sudo apt-get install sun-java6-jdk postgresql-8.3 postgresql-server-dev-8.3 sudo wgetgabriel@erpdev:~$ dpkg -l|grep postgresii postgresql-8.3 8.3.3-0ubuntu0.8.04 object-relational SQL database, version 8.3ii postgresql-client-8.3 8.3.3-0ubuntu0.8.04 front-end pro-grams for PostgreSQL 8.3ii postgresql-client-common 87 manager formultiple PostgreSQL client versiii postgresql-common 87 PostgreSQLdatabase-cluster managerii postgresql-doc-8.3 8.3.3-0ubuntu0.8.04 documentationfor the PostgreSQL database maii postgresql-server-dev-8.3 8.3.3-0ubuntu0.8.04 developmentfiles for PostgreSQL 8.3 server-gabriel@erpdev:~$ dpkg -l|grep javaii java-common 0.28ubuntu3 Base of allJava packagesii sun-java6-bin 6-06-0ubuntu1 Sun Java(TM)Runtime Environment (JRE) 6 (arii sun-java6-jdk 6-06-0ubuntu1 Sun Java(TM)Development Kit (JDK) 6ii sun-java6-jre 6-06-0ubuntu1 Sun Java(TM)Runtime Environment (JRE) 6 (ar

If you have downloaded the softwares in your machine you can follow the followingsteps.INSTALLING JAVA▪Copy the java jdk (jdk-6-linux-i586.bin) to your home directory for e.g. /home/user/▪Open a terminal ( Application -->> Accessories -->> Terminal )▪Type in the commandEXTRACTING ADEMPIERE▪Copy the Adempiere_<VERSION>.zip to your home directory for e.g. /home/user/▪Right click on the zip ﬁle andextracthere▪It will create a folder Adempiere with all the its ﬁles and foldersSETTING PROFILE FOR JAVA AND ADEMPIERE HOME▪Go to your home directory /home/user/ on your ﬁle browser▪Go to View -->> Show Hidden Files on the menu bar ( or simply Ctrl + h )▪Open.proﬁleﬁle and add the following lines at the bottom

./jdk-6-linux-i586.binexport JAVA_HOME=/home/user/jdk1.6.0/export ADEMPIERE_HOME=/home/user/Adempiere/Asia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on4SETTING TRUST

▪After installing PostgtreSQL, Open a terminal▪Do su and and enter your password (to login as root):▪Do passwd postgres to set the user postgres a password which is required▪Now we edit the pg_hba.conf (conﬁg) ﬁle for the trust declarations▪Change the authentication method to trust▪Add your database host IP under IPv4 if you are on a network (in my case my IPis 192.168.0.161)su root******passwd postgres******gedit /etc/postgresql/8.2/main/pg_hba.conf# Database administrative login by UNIX socketslocal all postgres trust# TYPE DATABASE USER CIDR-ADDRESS METHODAsia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on5

SETTING UP PGADMIN▪Launch pgAdmin III

# "local" is for Unix domain socket connections onlylocal all all trust# IPv4 local connections:host all all 127.0.0.1/32 trusthost all all 192.168.0.161/24 trust# IPv6 local connections:host all all ::1/128 trustAsia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on6

▪Fill in the New Server Registration for Postgres▪Fill in the database host IP▪Give a description▪Enter the password that you have set foruser postgres▪Next we create a new role and database for ADempiere useAsia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on7

▪From theNew Login Rolewindow:▪Fill in Role ﬁeld with ‘adempiere’▪Set the password as ‘adempiere’▪Tick all theprivlegesboxesAsia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on8▪Create a database and assign the owner to adempiere

Now jump to section 1.5 RUN_Setup (Linux Version) to continue.Asia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on91.4 Installing ADempiere in WindowsHere we repeat back the previous lessons on installing under linux OS but this time forMS Windows.

PLATFORM•Windows XP SP2

STEP 1 - SETUP ENVIRONMENT•NOTE: if you are using Windows VISTA, make sure UAC is turned off throughuser accounts.•Download & install the Java SE Development Kit (JDK) from

You can choose something like JDK 6.It is best that you install your Java in a separate root directory i.e.D:/Java6•Open Explorer and navigate to the D:\Java6 directory (or where-ever your Java isinstalled) and carefully note the JDK directory you just installed. Note that youmay have a number of jdk and jre directories.•On your Desktop (or using Start button / My Computer) right click My Computerand select System Properties / Advanced / Enviromental Variables•Alternatively: Start > Control Panel > System > Advanced tab > EnviromentalVariables•Add a new System Variable for your new JDK directory:•JAVA_HOME =D:\Java6•(or whatever your JDK directory is called)•Add a new System Variable for your new JRE directory:•JRE_HOME = D:\Java6\jre1.6.0 (or whatever your JRE directory is called)•Open a DOS shell with Start Button / Run / Open: cmd•Type "echo %JAVA_HOME%" (without the quotes) and press Enter keyhttp://java.sun.com/javase/downloads/index.jsp

Asia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on10•Carefully check the result to ensure the path to the JDK is correct•Type "echo %JRE_HOME%" (without the quotes)•Carefully check the result to ensure the path to the JRE is correct•Close the shellSTEP 2 - SETUP PATH•Still in My Computer / System Properties / Advanced / Environmental Variables:•In System Variables, scroll down to locate the Path variable and click Edit•Append the following JRE and PostgreSQL paths to the end of Path variable afterputting in a connector semi-colon ";" (Note: do not delete or overwrite the pathsthat are already in the Path variable! Also, make sure you don't have an extra "\" atthe end of D:\PostgreSQL\8.2\bin)•D:\Java6\jre1.6\bin;D:\Java6\jre1.6\;C:\Program Files\PostgreSQL\8.2\bin•Edit the commands that you just pasted to make sure that in each of the two JREreferences you have referred to your latest JRE. You must do this exactly, so openWindows Explorer and navigate to D:\Java and check the exact naming of the JREdirectory!•Open a DOS shell with Start Button / Run / Open: cmd•Type PATH•Carefully check the result to ensure the two paths to the jre are correctSTEP 3 - APP LOCATION▪You should have downloaded the ADempiere binary release from the above link•Extract the zip ﬁle to D\Adempiere . Extract to any root drive without parentfolder so that it is easy to recall.•Make sure you have achieved that all the Adempiere ﬁles are directly in theD:\Adempiere directory and not in a chained directory likeD:\Adempiere\Adempiereecho %JAVA_HOME%Asia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on11STEP 4 POSTGRES SETUP•Download to your Desktop the PostgreSQL binary fromhttp://www.postgresql.org/

•Unzip the PostgreSQL binary to a directory Postgres on your desktop (you can de-lete this and the zip ﬁle later)•Install PostgreSQL using the Windows msi installer. If you are re-installing Post-gresql then you need to remove Postgresql with Control Panel, then remove thedirectory D:\Postgresql\ then remove the user postgres with "net user postgres/delete".•If you are using Vista then you need to deactivate User Access Control from Con-trol Panel and install PostgreSQL using the Windows msi installer by right clickingand selecting Run AS Administrator. If you don't have "Run As Administrator" onthe context menu, then install the following registry ﬁx:http://juice.altiris.com/download/1382/msi-run-as-administrator-context-menu-for-vista•Install as a Service (later you can set the service to manual start if you don't wantPostgreSQL to run when you start-up)•Allow a Windows user to be created with name ‘postgres’ and password ‘postgres’•Instead of C select your local language•Instead of SQL-ANSI select UTF8•Allow a database administrator to be created with name ‘postgres’ and password‘postgres’Asia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on12MAKE SHORTCUTSYou can do this while the PostgreSQL database is being installed. You can save time bycreating Desktop shortcuts to:•D:\Adempiere\Run_Setup.bat•D:\Adempiere\utils\RUN_ImportAdempiere.bat (the bat may not be showing inyour Explorer)•D:\Adempiere\utils\RUN_Server2.bat•D:\Adempiere\utils\RUN_Server2Stop.bat•D:\Adempiere\RUN_Adempiere.batSETTING APP DATABASESTEP 1•Open pgAdmin III from Start Button / PostgreSQL / pgAdmin IIISTEP 2•Connect to postgresql•--Right click on the Postgresql database server and connect. --Enter password &tick the save box•Now, expand all the database server tree by clicking the plus-signSTEP 3•Down the bottom, you will see a user called "postgres".Do not modify this user.

This database username will be entered during adempiere server setup or else youwill have errors in dump restore.•Right click on Login Roles and create a new user "adempiere" with password"adempiere". Check superuser rights plus all boxes below superuser rights(see im-age below, left).Asia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on13

STEP 4•Now return to Database at the top and right click. Select create database. Name it"adempiere" and select the owner "adempiere" and encoding "UTF8" (see image onthe right). Leave all the other variables blank.Did You Know That?•Software is very expensive because of the man-days needed to develop and maintain it? It isalso due to the constant changes needed to make it to any specific condition.•ERP is complex? It is said that 92% of the ERP projects fail to meet all its stated objectives.Asia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on141.5 RUN_SetupLINUX VERSIONInstalling Adempiere

▪Go to $ADEMPIERE_HOME

▪Run RUN_setup.sh and enter your settings, test and saveYou can follow the values as in Windows Version below. The values above are for Ora-cle DB.Asia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on15WINDOWS VERSIONIf you installed a Desktop Shortcut as suggested while you were waiting for PostgreSQLto install, then you can just click the Desktop icon RUN_setupOtherwise:

▪Open a DOS shell with Start Button / Run / Open: cmd

▪Navigate to D:\adempiere

▪launch RUN_setup.batContinuing:

▪Click the Test button

▪Accept the Licence and Keys provided

▪Put in the correct parameters until the Test gives no errors and accepts 5432 asthe Database PortYou will need to change:

▪Database Type from oracleXE to postgresql

▪Database Name from xe to adempiere

▪Database Password to adempiere

▪System Password to postgres (or whatever you entered above for the databaseadministrator)

▪Don't change anything in the Mail Server settings unless you want to set-upAdempiere for production purposesYou may also need to change the following:

▪Adempiere Home to C:\Adempiere (if somehow it has been set to the wrong lo-cation)

▪Database Server from <your-computer-name> to localhost

▪Application Server Web Port to 8080 (if 80 is being used by something else) andSSL to 8443 (instead of 443)When the Test is without errors, click the Save button at the bottom right and waituntil the deployment is ﬁnishedAsia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on16COMMON REASONS FOR ERRORS DURING SETUP

▪Error on JDK: install JDK (the JRE is not sufﬁcient!)

▪Java 6 (such as update 4) does not work with some versions of Adempiere. Ifthere are application server or other errors it may be better to use the older Java 5JDK and JRE, say 1.5.0_14. If you change your Java then make sure you changethe Environmental Variables JAVA_HOME, JRE_HOME, the two (or three) refer-ences in PATH, and the RUN_setup.bat "Java Home"

▪Sometimes pljava is broken in Postgresql, for example in version 8.3.0. You willnot know this until you try to locate Products in Adempiere (see Step 11 below).If you have problems you will need to use the latest of version Postgresql 8.2

▪Make sure you follow every instruction exactly because there are many small de-tails that must be correct!

▪Java Home: in My Computer / System Properties / Advanced / EnvironmentalVariables create a System Variable JAVA_HOME for the location of your JDK

▪Web Port: probably port 80 is already used by other web server. You can usesomething like 8080 or 8088 (and correspondingly 8443 for the secure port)

▪If you get "Error Database Port (DB Server Port = 5432)", change the 'DatabaseServer' from <your-computer-name> to localhost. The alternative is to use a ﬁxedIP address on your server or desktop and put this address in the Database Server,or if you have a laptop then you need to install a loopback adapter

▪If you move the Adempiere directory (or update Adempiere) after already exe-cuting RUN_setup.bat, then you should delete the ﬁle adempiere.properties inC:\Documents & Settings\<your-user-name>

▪If you did not include in your path C:\Program Files\PostgreSQL\8.2\bin or theseparate drive and root location you speciﬁed, then you will need to replace thepsql command with:

D:\PostgreSQL\8.2\bin\psqlAsia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on171.6 RUN_ImportAdempiere.shThis routine is for importing ADempiere application metadata under Linux OS or Unixor Mac OS.

What is .sh?

▪SH is short for SHELL. So.shis a shell program. Inwindowsit is usually.batorbatchprogram.

▪Both.shand.batare ﬁles that has typed comands in them to be executedin the computer where they are run.The Metadata deﬁnes the application sturcture such as menu, windows, tables and col-umns structure. Later you will understand more about this. For now below is a betterway to execute the ImportAdempiere command.IMPORTING PG DUMP

▪Run each of the following commands by selecting the text and then pasting intothe shell using Right Click / Paste:Notes:

▪You may need to review the ﬁle dump_errors.log to ensure no errors occur dur-ing import

▪To quickly check whether pljava is working issue the following command inpgAdmin III query window against your adempiere database: select * fromrv_openitemSTEP 3 - IMPORTING METADATAImport the Adempiere data. If you installed a Desktop Shortcut as suggested while youwere waiting for PostgreSQL to install, then you can just click the Desktop iconRUN_ImportAdempiere.Otherwise:

▪Open a DOS shell with Start Button / Run / Open: cmd

▪Navigate to D:\Adempiere\utils

▪Type ‘RUN_ImportAdempiere.bat’psql -U adempiere -d adempiere -c "drop schema sqlj cascade"psql -U adempiere -d adempiere -f Adempiere_pg.dmp >> dump_errors.logD:\Adempiere\utils\RUN_ImportAdempiere.batAsia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on191.8 Windows InstallerContributed byKai Schaeffer, Germany▪ This installer runs under MS Windows platform and will install everything you need:▪ Java JDK▪ Postgres Database▪ ADempiere▪ Import the database dump▪ Create the environment and home settingsAll you need to do after this is just to double-click on the application icon and it runs!

Download Installer▪ (link in progress - meanwhile get it from this threadhttp://sourceforge.net/forum/message.php?msg_id=5697059▪ Opening screenJust Click Next like any good old Windows installer until finish. There will be some questionsalong the way that you have to answer.NOTE: Remember to give your machine name a simple one. New machines always come withvery long names and it is hard to recall them later.Asia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on20Simple enough. Just click Next.Of course you agree.Asia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on21Here you chooseyour harddisk loca-tion to put yourADempiere andPostgreSQL installa-tions. I would adviceto choose a separatedrive location andmake it a root direc-tory so that it is easyto find things later.Here we key in thepasswords that willbe used to access thePostgreSQL data-base. I would sug-gest to use a simpleand easy to remem-ber one such as‘adempiere’. Oftenthan not users forgotdue to keying some-thing else. Also dur-ing troubleshootingit can be confusingwhen you are notsure which is which.So it is best to usethe same password throughout. At least for a start.Asia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on22You notice the installation is smart that it detects if you got Java installed before. It will just pro-ceed with the rest till the end. Meanwhile take note that a log is saved to refer to later for errors.Asia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on23

You are finally there when you see theClosebutton lighting up for you to click on.Asia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on241.9 RUN_Server2LINUX VERSIONWINDOWS VERSIONIf you installed a Desktop Shortcut as suggested while you were waiting for PostgreSQL to in-stall, then you can just click the Desktop icon RUN_Server2Otherwise:▪ Open a DOS shell with Start Button / Run / Open: cmd▪ Navigate to F:\Adempiere\utils▪ Type 'RUN_Server2.bat'Later, to shut down the Application Server, you can either:▪ click the Desktop icon RUN_Server2Stop▪ crash the Server by just closing the shell

./Applications/Adempiere/utils/RUN_Server2.shF:\Adempiere\utils\RUN_Server2.batAsia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on251.10 RUN_ADempiereLINUX VERSION▪Once it's done, then run RUN_Adempiere.sh to start Adempiere.▪You have to provide the opening dialog box with your login and password. Justtype in SuperUser/System for the test sample login.▪Here I am just fooling around with the language selection.▪Click on the Host connection icon to conduct tests if needed.

Asia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on26NOTES:1.After pressing the lower test button it returns a green pass indicating the databaseis active and functioning.2.The upper button is for testing the Application Server, which is used for web ac-cess to your ADempiere and it can only be tested positive if you haveRUN_Server2.3.Note that you can still run your ADempiere at your PC where you install it with-out the application server.4.You need not go into this test box. It is only called when you want to do a test be-fore continuing.5.Just keep clicking OK and you shall proceed to the ﬁgures on the next page.Asia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on27This is the login selection box whereyou select your Role, Client, Organisa-tion, Warehouse and Printer.Usually you just select your Role andpressed the OK button.Below is the welcome screen whenyou successfully gone through theabove steps. It is a User Dashboardcontaining KPI (Key Performance Indi-cators information)Asia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on28This is the main menu of the ADempiere ERP System.Its menu display is dependant onyour Role deﬁnition of the menu.Asia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on29WINDOWS VERSION

Start the Adempiere Java Client:If you installed a Desktop Shortcut as suggested while you were waiting forPostgreSQL to install, then you can just click the Desktop icon RUN_AdempiereOtherwise:

▪Open a DOS shell with Start Button / Run / Open: cmd

▪Navigate to C:\Adempiere\

▪Type RUN_Adempiere.batContinuing ...

▪On the ﬁrst Login Screen labelled Connection, the Server will probably bea pink line. Click the pink line so the Adempiere Connection windowopens

▪Enter <your-computer-name> for the Application Host. Click Test Applica-tion Server and it should result in a green tick as well as sort out the Data-base parameters.\

▪Click Test Database, which should result in a green tick (Vista Users mayneed to sort out security as in the Note below)

▪Select the green tick to close the Adempiere Connection window.Note for Vista users: If when you Test Application Server you get a green tick buta red cross for Test Database you have a problem with PostgreSQL security onyour computer. As a safety feature PostgreSQL will only let you access it if youare NOT an administrator, which helps to stop any hackers in the real world.

▪Solution-> Make a new user on your computer. Name it "postgres" andmake sure its a standard user, NOT ADMIN. Now run the Setup.bat (samesettings should still be there). Click save. Then run the RUN_Server2.batand then RUN_Adempiere.bat. Do the test now and it should work. Also,for Test Application server use your computer name (ie Gregs_PC) but forthe Database use localhostAsia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on30Create a Purchase Order to test that all is working:▪ Login to Adempiere as GardenAdmin with password GardenAdmin. On the next screenaccept the defaults and click the green tick. The Java Client will open!▪ Select Menu tab▪ Select Requisition-to-Invoice / Purchase Order▪ A new record will open with the Business Partner field in pink▪ Click the icon at the end of the Business Partner and a Business Partner Info window willopen▪ Press Enter and all the Business Partners will show▪ Highlight Tree Farm or another partner, and click the green tick▪ On the left menu, select PO Line▪ Click icon on the end of the Product field and the Product Info window will open▪ Press Enter and all the Products should appear. If the Products do appear the PL/Java isoperational. If the Products do not appear then your PL/Java is not working and you needto check that you have activated PL/Java in the method above!To Exit:▪ Click the red cross to Exit▪ Close the Purchase Order window to Exit this PL/Java confirmation test.Congratulations!!!:You might want to check for patches though. SeePatches_Installationfor a manual on how toinstall them.Quiz1.What is the hardest part in installing ADempiere?2.What is the intial database dump of ADempiere and where is it stored?3.What platforms can ADempiere operate in?4.What kind of databases does ADempiere run on?

Asia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on31Glossary

TerminologyExplanationsFOSSFree and Open Source SoftwareERPEnterprise Resource Planning - for integrated running of an or-ganisation processes and its audit and reporting.UbuntuA version of Linux Operating System that can replace MicrosoftWindowsWindows StackA set of software that runs well on MS Windows onlyJavaAn Object-Oriented language that also has virtual machine torun on different platformsPostgreSQLA FOSS database engine that can replace Oracle DBADempiereA FOSS ERP software that includes CRM, POS and SCMPGAdminPostgreSQL Administrator panel to maintain the DB functions.EnvironmentSettings in the computer system for locations and valuesRight LocationSuch as drive and root directory: D:/RUN_SetupADempiere program to run first after softwares setupRUN_ImportAD-empiereProgram to import the initial database into the ERP SystemRUN_AdempiereProgam to launch the ADempiere ERP applicationRUN_Server2Program to launch ADempiere’s application serviceAsia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on32Summary1.We need to install 3 important softwares for ADempiere to run;2.We can install either on Windows with the easy Windows Installer or more manualmethods in Linux platform;3.Java is a common pre-requisite software to be present in the system ﬁrst before in-stalling the datbase and ERP application.;4.For database we can use either the proprietary Oracle or the free PostgreSQL;5.After intallation of the 3 softwares, we import the starting database into the engine;6.Then ADempiere ERP can be operated;7.We use the application server to run ADempiere in a web environment. It also con-trols the accoints posting to be centralised and consistent;Did You Know That?ADempiere can also run on the IBM DB2 database? It is ported over by a student teamled by Professor Stuart Nettleton at the University of Technology Sydney, Australia incooperation with the IBM Innovation Centre. The team also port the system to run onIBM’s application server which is WebSphere.Asia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on33Chapter 2 - Functional StructureLearning ObjectivesBy the end of this chapter, the student shall be able to:1.Identify the menu structure of the ERP application;2.Make reference to the functional elements in the menu;3.Identify each functional item as either window, process, report or customised;4.Trace each item in the Application Dictionary.Asia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on34IntroductionIn this chapter we try to explain the whole menu tree structure and its underlyingcommon design. Each menu item has a function to do and that is facilitated alot bywhat is called theApplication Dictionary. It determines the menu tree, window tabs,table’s columns, and embedded functions as well as properties or rules or scope of itsbehaviour. This section serves as a full reference guide to each menu item so that thestudent can come back to this again and again when needing to know what is behindeach menu in a fast manner.Main ReferenceMuch of the ADempiere menu tree reference and its item information provided here arederived from the community project’s resource wiki which can be accessed online athttp://www.adempiere.com/wiki.Asia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on35The reference indexes of the ADempiere menu tree shall be laid out in the followingpages. They are based on ADempiere 3.4.0’s menu which is the most stable to date. Asan aggregated value you will ﬁnd:▪in second column the program type: Workbench, WorkFlow, Process, Report, Task,Window, Form, Menu.▪in third column the name of associated tables, or the name of reports and/or proc-esses inside that option.This information is already a good technical help, i.e. if you want to know which win-dow is used to maintain a table, you can ﬁnd that table on this page and it will showyou which is the corresponding maintenance window. Same if you want to ﬁnd whichwindow executes a process, you ﬁnd it and it will show the window/process/report.Prior to that I have made some illustration with info-boxes to try to help you visualisewhich is which. It will take some time for you to absorb the facts. Just take it easy. ERPis highly complex, and the menu items seems to make up of quite alot of things. How-ever many items are not necessarily used or at least not most of the time.Asia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on362.1 Concept of Functional StructureBelow is a snapshot of the System Admin Menu Tree. It is seen when you login with arole as SystemAdmin. Here we will just preview at the ﬁrst upper part of the tree.I willexplain the various icons on the tree structure.I will also explore each itemto explainwhat arethe details behind or within them. More details about them on the next pages.Asia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on37STANDARDWINDOWWORKFLOWAD_System(org.compiere.process.SystemValidate)AD_Registration (org.compiere.process.RegisterSystem)AD_Language (org.compiere.install.LanguageMaintenance)org.compiere.install.TranslationDialogAD_Language (org.compiere.install.LanguageMaintenance)+AD_Element_Trl +AD_Message_Trl +AD_Window_Trl +AD_Tab_Trl+AD_Field_Trl +AD_FieldGroup_Trl +AD_Process_Trl +AD_Form_Trl+AD_Task_Trl +AD_Workﬂow_Trl +AD_WF_Node_Trl +AD_Menu_Trl+AD_Ref_List_Trlorg.compiere.process.UserPasswordTABLE INWINDOW TABATTACHED CODEIN TABLECUSTOMWINDOWPROCESS orREPORTROUTINEFOR EACHMENU ITEM

This is the standard or common window format or user interface in theADempiere ERP System. Such a window will have at least one tab and upto as many tabs as deﬁned by the user. Standard windows have standardCRUD functions (create, read, update, delete of records). This is the beautyof the ERP System in that we need not deﬁne the look and feel of each win-dow as it is done by the Application Dictionary. The developer or user only need to de-ﬁne the Window sub elements such as the number of tabs, and ﬁelds in each tab table.The large green box on the right contains more information about eachmenu item. Information are labeled by the following brown boxes.Each standard window’s tab will be assigned to a deﬁned table and col-umn in the system. That table contains actual data and is part of the data-base. You use the name stated to look for it in the Oracle or Postgres DB.There may be attached code in a certain ﬁeld of the deﬁned table. Or it canbe a procedure or embedded in a processing button in the tab ﬁeld. Such aprocedure will be executed when launched or pressed if its a button.AWorkﬂowis an index to other items arranged in a ﬂow diagram. This is aworkﬂow because it is shaped differently. How an item is deﬁned as awindow or workﬂow or otherwise is set in theMenuof System Admin.Sometimes standard windows cannot fulﬁll properly a need of the func-tion or user-deﬁned ones such as a Point Of Sales interface. A developerwill then create a customised panel based on the Java language and attachit to this menu item. Such a customised window is called a ‘Form’as op-posed to a window.Another type of standard function window is what is called a Report &Process type. It handles speciﬁc process or launch reports as deﬁned.Now the next page will go through this concept again with some of the la-belled examples so that you can try to visualise all this more readily.Asia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on38STANDARDWINDOWWORKFLOWTABLE INWINDOW TABATTACHED CODEIN TABLECUSTOMWINDOWPROCESS orREPORTROUTINEFOR EACHMENU ITEM2.2 Concept of Application DictionaryHere I shall explain further in general so as to quickly grasp the big picture without getting lostin too much details. Later in the course we would get deeper. You can see the first menu item‘System’ which is said to be aWindowas it has thatdouble window graphicsand a table definedwithin it as stated in the green box. If it is double-clicked on, it will open into a window with asingle tab. We know its a single tab because it has only one table assigned for it. That tab’s singletable is ‘AD_System’. How we know that shall be explained a bit later.Notice that at the bottom right is a button with the words “Validate Support”. That shows anattached java code or procedure and this is shown in the greenbox too within brackets:(org.compiere.process.SystemValidate).Again such matters are explained in due time later.Let us look for a window that hasmany tabs. There is a ‘SystemTranslation Check’ window.Note that in the greenbox it hasmany Tab-Tables:Asia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on39AD_Language (org.compiere.install.LanguageMaintenance)+AD_Element_Trl +AD_Message_Trl +AD_Window_Trl +AD_Tab_Trl+AD_Field_Trl +AD_FieldGroup_Trl +AD_Process_Trl +AD_Form_Trl+AD_Task_Trl +AD_Workﬂow_Trl +AD_WF_Node_Trl +AD_Menu_Trl+AD_Ref_List_TrlNow let’s go to another item which is ‘Translation Import/Export’ is stated as a customisedwindow because it has no defined tab table. Thus its java code that will open up is defined in‘org.compiere.install.TranslationDialog’. As you can see here, its is a uniquely defined win-dow panel and is not the standard formas in the previous two windows. Such awindow is calleda ‘Form’. It is deter-mined purely by the Java code that iscalled which isTranslationDialog.Now we have other type of items suchas Report & Process and Printouts.However we won’t go into them as theyare along the same concept we are try-ing to explain here. For now just under-stand this little bits and see if it makessense.Asia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on40Ok, how do we know how many tabs does each window has and what table is within each tab inthe menu? We know by going into the Application Dictionary or start with theWindow Tab andColumnitem in the menu. Remember this menu I am talking about is the SystemAdmin menu.You log into it by choosing the SystemAdmin role. From theTabmenu we see how many tabseach window has.Each tab is stated the name of the Table & Field object it is relying on. Now you know where wegot this green box info from:If there is more than one +such as ++ it means that theTab is achild of the previousTab. A child tab is one thathas records within the sameparent key such as for aSales Order, its child tab will contain the Sales Order’sOrderlines.Another term for this isMaster-Detail.Thus, you can say that the way the windows are defined with the tabs or not, with how manytabs, and its associated tables and then its associated processes within each table as what the Ap-plication Dictionary is all about. Taking one step back, all the items are placed in the Menu byanother Application Dictionary control calledMenu.AD_Language (org.compiere.install.LanguageMaintenance)+AD_Element_Trl +AD_Message_Trl +AD_Window_Trl +AD_Tab_Trl+AD_Field_Trl +AD_FieldGroup_Trl +AD_Process_Trl +AD_Form_Trl+AD_Task_Trl +AD_Workﬂow_Trl +AD_WF_Node_Trl +AD_Menu_Trl+AD_Ref_List_TrlAsia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on41Now that we have seen abit how the whole application structure is deﬁned, we arelucky that it has all been pre-deﬁned nicely for us. What is left for us now is to just gothrough each deﬁned item on the menu tree. We will now list both the SystemAdminand the Client menus which has the ERP functional ﬂows. System Admin is more fordeﬁning the Application. Don’t worry if you cannot differentiate which is which. Justremember that System Admin is for Application Dictionary or ERP conﬁguration workand Client Admin is for real ERP business. And it is all laid out for us when we log intoour own role in the system. (The following menu tree functional reference is mainly thework of Carlos Ruiz of Colombia. There are also many other community members thathave assisted and shall assist as the wiki is dynamic and constantly receive contribu-tions everyday).Did You Know That?•The ADempiere Application Dictionary is the brainchild of its parent project Compiere? Itsowner Jorg Janke described the AD, as it is called in short, as metadata about the ERP that canadapt to the ‘everything changes’ concept of real life busineses.•The software coding of an ERP is just 10% of the effort? 90% is about knowing the subjectmatter, knowing what goes where and how.Asia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on422.3 Standard CRUDAs stated earlier, the Application Dictionary sort of resolves the CRUD (Create, Read,Update, Delete controls) of the application without the user or implementor worryingabout programming that part at all. This means that the user just need to concern aboutthe model of the ERP System. S/he go straight to deﬁning the table and ﬁeld structureand its relationship with each other and its validation rules without thinking abouttouching sourcecode which s/he is most likely not that technical. This means you cando fast prototyping and extensions to the model or data model. You can also makechanges after that in like convenient fashion.Below here shall be shown the parts of the system that is standard and granted wheve-ner you deﬁne a new extension to the model.It is the top menu panel that always appear in every window. This is already preset inthe ADempiere software. So you need not think about how to get it out on every newwindow anymore. It has pull down menus from FILE to HELP options. Then it has arow of graphical icons that does a speciﬁc task when clicked on. We shall go throughsome of them so that you can learn of thier common controls which are available inevery window that you shall encounter from now on.Asia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on43UNDONEW RECORD -lights up whencreating one isallowedSAVE RECORD - Lights up when there is changeREFRESHDELETE singlerecordDELETE multiple recordsATTACHMENTGRIDVIEWTOGGLENAVIGATE BETWEEN TABSNAVIGATEBETWEENRECORDS;FIRST ANDLAST.PREVIEW RECORDARCHIVED DOCUMENTSPRINT OUTCHECKREQUESTSORCREATENEWWAREHOUSEEarlier I have shown you that the window tabs are controlled bythe AD under the Window, Tab and Field window. As you can seeon the left, the tabs will appear according to what is conﬁguredthere. Now, all windows will have the left tab structure. This is adisplay that is done automatically. It is already arranged and eachtab also has a hierarchy indent. As you can see the Customer Ac-counting Tab lies further to the right than the Customer one whichin turn is right to the Business Partner. This left-to-right positioningis set within the Window, Tab and Field for each Tab.The top down layout is according to the number of tabs deﬁned.Each tab will now respond to your mouse click upon any of them.At the bottom left of the panel you can see a status message “Navi-gate or Update Record”. This status message is according to what ishappening in the application. During processing, if there is error, itwill show according to the error status message. If it is ok, it showsa succesfull status message.At the bottom right of the window you can see markings such as *1/which means that it is a new record and not yet saved. If there are anumber of records in this table, let’s say 10, and you are at the 3rdrecord it will show 3/10.Asia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on442.4 Application ReferenceM1 SYSTEM ADMINM1.1 GENERAL RULESM1.1.1 System RulesSystemWindow AD_System (org.compiere.process.SystemValidate)System RegistrationWindow AD_Registration (org.compiere.process.RegisterSystem)Language SetupWorkFlowLanguageWindow AD_Language (org.compiere.install.LanguageMaintenance)Synchronize Doc TranslationProcess org.compiere.process.TranslationDocSyncTranslation Import/ExportForm org.compiere.install.TranslationDialogSystem Translation CheckWindow AD_Language (org.compiere.install.LanguageMaintenance)+AD_Element_Trl+AD_Message_Trl +AD_Window_Trl+AD_Tab_Trl +AD_Field_Trl+AD_FieldGroup_Trl+AD_Process_Trl +AD_Form_Trl +AD_Task_Trl+AD_Workﬂow_Trl +AD_WF_Node_Trl+AD_Menu_Trl+AD_Ref_List_TrlMenuWindow AD_Menu +AD_Menu_TrlTreeWindow AD_Tree (org.compiere.process.TreeMaintenance)Replication StrategyWindow AD_ReplicationStrategy +AD_ReplicationTableTree MaintenanceForm org.compiere.apps.form.VTreeMaintenanceTaskWindow AD_Task+AD_Task_Trl+AD_Task_AccessAsia e-University Master in Open Source ERPCopyr i ght ( C) 2009 Redhuan D. Oon, ADempi er e Communi t y ERP Appl i c at i on Set up and Oper at i on45ReplicationWindow AD_Replication (org.compiere.process.ReplicationLocal)+AD_Replication_Run++AD_Replication_LogSystem ColorWindow AD_ColorSystem ImageWindow AD_ImageError MessageWindow AD_ErrorNoticeWindow AD_Note (org.compiere.process.NoteDelete)Country Region and CityWindow C_Country+C_Country_Trl+C_Region ++C_CitySystem ConﬁguratorWindow AD_SysConﬁg