Book Image

Working with OpenERP

By : Greg Moss
Book Image

Working with OpenERP

By: Greg Moss

Overview of this book

<p>OpenERP continues to gain momentum throughout the world in providing the best platform for open source ERP installations. This book covers all the essential modules and how to get the power of OpenERP to work for you.</p> <p>"Working with OpenERP" provides a real-world business solution approach to integrating OpenERP into your small or medium sized business. This book begins by walking you through how to install OpenERP on a Windows or Ubuntu server then takes you through all the essential modules you will need to get OpenERP up and running for your company.</p> <p>All through the book, "Working with OpenERP" provides real-world examples in sales, customer relationship management (CRM), purchasing, manufacturing, human resources, and financial accounting. After covering the basics, you will learn how to customize various methods to configure OpenERP for your business and even build your own custom modules.</p> <p>"Working with OpenERP" covers all the basics of installing and using OpenERP along with advanced real-world examples you will not find anywhere else.</p>
Table of Contents (21 chapters)
Working with OpenERP
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Getting to know the OpenERP architecture


Setting up and managing an OpenERP installation will require a basic understanding of the components that make up OpenERP. Every ERP system has a set of technologies and underlying software platforms that are required for the system to function. Fortunately, unless you plan to do OpenERP customization, you only need to understand the very basics of the OpenERP architecture to manage the installation.

Tip

In this book we provide a basic overview of the OpenERP architecture. If you wish to get more detailed documentation on the OpenERP architecture visit:

https://doc.openerp.com/trunk/server/02_architecture/

Introducing the PostgreSQL database

Like most ERP systems, OpenERP has specific database requirements. In this case, that is PostgreSQL. PostgreSQL is an open source, cross-platform object relational database management system (ORDMS). While not popular on the scale of Microsoft SQL Server or MySQL, PostgreSQL is an enterprise-class database server with many advanced features. In fact, PostgreSQL stacks up very well against far more expensive databases such as Microsoft SQL Server and Oracle Database.

Observing database specifications

From a specification standpoint, PostgreSQL is perfectly capable of handling nearly any OpenERP installation. In most instances you will hit limits of OpenERP scalability and performance long before you will go past the hard limits of PostgreSQL itself. Still, when installing any ERP system, it is important that you clearly understand the most critical database specifications. Here are the specs for PostgreSQL:

Limit

Value

Maximum database size

Unlimited

Maximum table size

32 TB

Maximum row size

1.6 TB

Maximum field size

1 GB

Maximum rows per table

Unlimited

Maximum columns per table

250 - 1600 depending on column types

Maximum indexes per table

Unlimited

Running cross platform

PostgreSQL runs on every major operating system. For most OpenERP installations, Ubuntu is the operating system of choice. However, PostgreSQL will also run quite well under other versions of Linux, Microsoft Windows, and even Mac OS X.

You can learn more about PostgreSQL at:

http://www.postgresql.org/

Writing code with Python

The primary programming language of OpenERP is Python. Like the other technologies underlying OpenERP, Python language is open source and will run on all the major contemporary operating systems.

You can learn more about the Python programming language at:

http://python.org/

Following the Model-View-Controller design

OpenERP is built upon a Model-View-Controller (MVC) architecture. One of the primary goals of this architecture is to separate the visual display of the information from the business rules and management of the underlying data. For example, if you need to change the way data is organized in the model, it is desirable not to have to make dramatic changes to how you view the data. The same is true for maintaining flexibility in viewing data. Today it is common to have many different client applications sharing the same underlying data.

In OpenERP's case, they have often supported a web-based client as well as a desktop client application based on the Gnome Toolkit and known at the GTK client. OpenERP's MVC architecture allows developers to create a wide range of client applications to extend OpenERP.

Tip

Starting with Version 7, the GTK client is no longer in development by the core OpenERP team. Instead, GTK development has been handed over to the community.

Designing models

The model is essentially the data that makes up your OpenERP installation, which is stored in the PostgreSQL database. OpenERP is unique in the way that database structures are typically defined by the OpenERP modules at the time they are installed. The OpenERP framework takes the model definitions and automatically creates the necessary table structures inside the PostgreSQL database. Furthermore, a web interface in OpenERP allows administrators to easily extend the OpenERP data model in a variety of ways without having to modify the OpenERP source code.

Rendering views

Each view in OpenERP is defined in XML documents. The OpenERP framework is responsible for rendering these view files in a web browser. Alternative views can be built to render OpenERP functionality upon other platforms, such as mobile devices.

Authoring controllers

The controller component of the architecture is where the business logic and workflow rules of the OpenERP application are applied. The controller components in OpenERP are written in Python code and stored as objects in OpenERP modules.