478
Open ERP, a modern approach to integrated business management Release 1.0 Fabien Pinckaers Geoff Gardiner 2009-04-09

DocOpenERP - Openerp book

Embed Size (px)

DESCRIPTION

Documentación Open ERP - Open ERP, a modern approach to integrated business management Release 1.0

Citation preview

  • Open ERP, a modern approach tointegrated business management

    Release 1.0

    Fabien PinckaersGeoff Gardiner

    2009-04-09

  • iCONTENTS

  • ii

  • Open ERP, a modern approach to integrated business management, Release 1.0

    CONTENTS 1

    I Foreword 7

    1 Open Source software at the service of management 11

    2 The Open ERP Solution 13

    2.1 Why this book? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

    2.2 Whos it for? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

    3 Structure of this book 15

    4 Dedication 17

    II First steps with Open ERP 19

    5 Installation and Initial Setup 23

    5.1 The architecture of Open ERP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

    5.2 The installation of Open ERP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

    5.3 Database creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

    5.4 New Open ERP functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

    6 Guided Tour 41

    6.1 Database creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

    6.2 To connect to Open ERP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

    6.3 Installing new functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

    6.4 Guided Tour of Open ERP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

    7 Developing a real case 67

    7.1 Use case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

    7.2 Functional requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

    7.3 Database creation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

    7.4 Installing and configuring modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

    7.5 Database setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

    7.6 Testing a Purchase-Sale workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

    III Managing Customer Relationships 89

    8 Leads, Business Opportunities and Campaigns 93

    8.1 Managing Contacts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

    8.2 Leads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

  • Open ERP, a modern approach to integrated business management, Release 1.0

    2 CONTENTS

    8.3 Sales Opportunities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

    9 Customer Relationship Management 107

    9.1 Partners . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

    9.2 Case management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110

    9.3 Profiling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123

    10 Communications Tools 127

    10.1 Microsoft Outlook interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127

    10.2 Mozilla Thunderbird interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

    10.3 Microsoft Word interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132

    IV General Accounting 137

    11 From invoice to payment 141

    11.1 Accounting workflow and the automatic generation of invoices . . . . . . . . . . . . . . . . . . . . 141

    11.2 Invoicing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

    11.3 Accounting entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153

    11.4 Management of payments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160

    12 Financial Analysis 167

    12.1 Managing accounts payable / creditors and accounts receivable / debtors . . . . . . . . . . . . . . . 167

    12.2 Statutory taxes and accounts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172

    12.3 Company Financial Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

    13 Configuring Accounts from A to Z 183

    13.1 Chart of Accounts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183

    13.2 Journals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186

    13.3 Periods and fiscal years . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188

    13.4 Payment Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189

    13.5 Entries at the start of a year . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190

    V Effective Management of Operations 191

    14 Analytic Accounts 195

    14.1 To each enterprise [his] own analytic chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196

    14.2 Putting analytic accounts in place . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201

    14.3 Analytic records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203

    14.4 Financial Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205

  • Open ERP, a modern approach to integrated business management, Release 1.0

    CONTENTS 3

    15 Organization of Human Resources 211

    15.1 Managing Human Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211

    15.2 Timesheets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214

    16 Services Management 223

    16.1 Managing Service Contracts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223

    16.2 Planning that improves leadership . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227

    16.3 Treatment of expenses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231

    17 Internal Organization and Project Management 233

    17.1 Project management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233

    17.2 The art of productivity without stress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238

    VI Stock and Manufacturing 243

    18 Logistics and Stock Management 247

    18.1 Understanding double-entry stock management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248

    18.2 Complete workflow from supplier to customer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250

    18.3 Stocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257

    18.4 Logistics Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267

    18.5 Import / Export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274

    18.6 Warehouses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275

    18.7 Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278

    18.8 Management of lots and traceability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280

    18.9 Management by Journal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284

    18.10 Advanced elements of stock management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288

    19 Manufacturing 297

    19.1 Management of production . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297

    19.2 Bills of Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298

    19.3 Multi-level Bills of Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302

    19.4 Manufacturing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307

    19.5 Workflow for complete production . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308

    19.6 Production order in detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317

    19.7 Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320

    19.8 Calculation of lead times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321

    19.9 Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322

    19.10 Events and barcodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330

  • Open ERP, a modern approach to integrated business management, Release 1.0

    4 CONTENTS

    19.11 Treatment of exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 332

    19.12 Manual procurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333

    19.13 Management of waste products and secondary products . . . . . . . . . . . . . . . . . . . . . . . . 335

    19.14 Management of repairs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337

    VII Sales and Purchasing 343

    20 Management of Sales 347

    20.1 Sales Quotations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347

    20.2 Management of Packaging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353

    20.3 Management of Alerts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354

    20.4 Control of deliveries and invoicing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356

    20.5 Management of Carriers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357

    20.6 Margin Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360

    20.7 Price management policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364

    20.8 Rebates at the end of a campaign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370

    20.9 Open orders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372

    20.10 Layout templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373

    21 Purchasing Management 375

    21.1 All the elements of a complete workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375

    21.2 Analyis of purchases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384

    21.3 Supplier relationship management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385

    21.4 Analytic accounts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386

    VIII Process and Document Management 387

    22 Process 389

    22.1 The integration of processes into the management system . . . . . . . . . . . . . . . . . . . . . . . 389

    22.2 Workflows and User Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394

    23 Integrated Document Management 403

    23.1 The importance of good document management . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403

    23.2 Classic document management solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404

    23.3 The Open ERP solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405

    23.4 Internal and external access using FTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407

    23.5 Mapping between Open ERP resources and directories . . . . . . . . . . . . . . . . . . . . . . . . . 408

    23.6 Managing Attachments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410

  • Open ERP, a modern approach to integrated business management, Release 1.0

    CONTENTS 5

    23.7 Virtual Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411

    23.8 Standardizing Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412

    23.9 Searching for documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413

    23.10 Integration with emails . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415

    23.11 Working with users changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415

    23.12 Version Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417

    23.13 Documents used for company processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417

    IX System Administration and Implementation 419

    24 Configuration & Administration 423

    24.1 Creating a Configuration Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424

    24.2 Configuring the menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424

    24.3 User Login . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429

    24.4 Managing access rights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429

    24.5 Groups and Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430

    24.6 Configuring workflows and processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433

    24.7 Configuring reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434

    24.8 Importing and exporting data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441

    25 Implementation Methodology 449

    25.1 Requirements Analysis and Planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 449

    25.2 Deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450

    25.3 User training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453

    25.4 Support and maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454

    X Conclusion 457

    26 You arent alone 461

    26.1 Bypass the technical difficulties by using the SaaS offer . . . . . . . . . . . . . . . . . . . . . . . . 461

    26.2 Consult the available resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461

    Index 463

  • Open ERP, a modern approach to integrated business management, Release 1.0

    6 CONTENTS

  • 7Part I

    Foreword

  • Open ERP, a modern approach to integrated business management, Release 1.0

    9

    Information Systems have played an increasingly visible role over the past several years in improving the compet-itiveness of business. More than just tools for handling repetitive tasks, theyre used to guide and advance all of acompanys daily activities. Integrated management software is today very often a key source of significant competi-tive advantage.

    The standard response to a need for responsiveness, reliability, and rapidly increasing expectations is to create an or-ganization based on departments with a clear linear structure, integrated around your operating processes. To increaseefficiency amongst salespeople, accountants, logistics staff and everyone else you should have a common understand-ing of your problems.

    For this you need a common language for shared references, policies and communication. An ERP (Enterprise Re-source Planning) system makes the ideal platform for this common reference point.

  • Open ERP, a modern approach to integrated business management, Release 1.0

    10

  • 11

    CHAPTER

    ONE

    OPEN SOURCE SOFTWARE AT THESERVICE OF MANAGEMENT

    Risks and integration costs are important barriers to all the advantages you gain from such systems. Thats why, today,few small- and medium-sized companies use ERP. In addition, the larger ERP vendors such as SAP, Microsoft andOracle havent been able to reconcile the power and comprehensive cover of an ERP system with the simplicity andflexibility wanted by the users. But this is exactly what small and medium enterprises are looking for.

    The development processes of open source software, and the new business models adopted by their developers, providea new way of resolving such problems of cost and quality for this kind of enterprise software.

    To make an ERP system fully available to small and medium enterprises, cost reduction is the first priority. Opensource software makes it possible to greatly reduce development costs by aggressive reuse of open source softwarelibraries; to eliminate intermediaries (the distributors), with all of their expensive sales overhead; to cut out sellingcosts by free publication of the software; and to considerably reduce the marketing overhead.

    Since there is open interaction among thousands of contributors and partners working on the same project, the qualityof the resulting software benefits greatly from the scrutiny. And you cant be everything at once: accountant, softwaredeveloper, salesperson, ISO 9001 quality professional, specialist in agricultural products, expert in the customs andhabits of pharmaceutical vendors, just as a start.

    Faced with these wide-ranging requirements, what could be better than a world network of partners and contributors?Everyone adds their own contribution according to their professional competence. Throughout this book youll seethat the results exceed any reasonable expectations when such work is well organized.

    But the real challenge of development is to make this solution simple and flexible, as well as complete. And to reachthis level of quality you need a leader and co-ordinator who can organize all of these activities. So the developmentteam of Tiny ERP, today called Open ERP, is responsible for most of the organization, synchronization and coherenceof the software.

    And Open ERP offers great performance in all these areas!

  • Open ERP, a modern approach to integrated business management, Release 1.0

    12 Chapter 1. Open Source software at the service of management

  • 13

    CHAPTER

    TWO

    THE OPEN ERP SOLUTION

    Because of its modularity, collaborative developments in Open ERP have been cleanly integrated, enabling any com-pany to choose from a large list of available functions. As with most open source software, accessibility, flexibility,and simplicity are important keywords for development. Experience has shown that theres no need to train users forseveral months on the system, because they can just download it and use it directly.

    So youll find the modules for all types of needs, allowing your company to build its customized system by simplygrouping and configuring the most suitable modules. Hundreds of modules are available.

    They range from specific modules like the EDI interface for agricultural products, which has been used to interfacewith Match and Leclerc stores, up to the generic demonstration automation module for ordering sandwiches, whichcan take care of the eating preferences of your staff.

    The results are rather impressive. Open ERP (once called Tiny ERP when it started out) is management software thatis downloaded more than any other in the world, with over 600 downloads per day. Its available today in 18 languagesand has a world network of partners and contributors. More than 800 developers participate in the projects on thecollaborative development system of Tiny Forge.

    To our knowledge, Open ERP is the only management system which is routinely used not only by big companies butalso by very small companies and independent companies. This diversity is an illustration of the softwares flexibility:a rather elegant coordination between peoples functional expectations of the software and great simplicity in its use.

    And this diversity is also found in the various sectors and trades which use the software, including agricultural products,textiles, public auctions, IT, and trade associations.

    Lastly, such software has arisen from the blend of high code quality, well-judged architecture and use of free tech-nologies. In fact, you may be surprised (if youre an IT person) to find that the download size of Open ERP is onlyaround 6 MB. When thats expanded during installation its size is mostly attributable to all the official translations thatare packaged with it, not the operating code. Weve moved a long way from the days when the only people who couldbe expected to benefit from ERP were the owners of a widget factory on some remote industrial estate.

    2.1 Why this book?

    Many books set out to tell readers about the management of enterprise, and equally many aim to instruct the reader inthe use of a piece of specialized software. Were not aiming to add to those lists because our approach is intended tobe different.

    Having restructured and reorganized many businesses, we wanted our management experience to generate a work thatis both instructive and practical. It was important for us not to write a manual about Open ERP, but instead a work thatdeals with advanced management techniques realized through these IT tools. Youll see what management practicesmight be useful, whats possible, and then how you could achieve that in Open ERP.

    Its this that well consider Open ERP for: not as an end in itself but just the tool you use to put an advanced manage-ment system into place.

  • Open ERP, a modern approach to integrated business management, Release 1.0

    14 Chapter 2. The Open ERP Solution

    2.2 Whos it for?

    Written by two CEOs who have been successful with new technologies, this book is aimed at directors and managerswho have an ambition to improve the performance of their whole companys management team. Theyre likely alreadyto have significant responsibilities and possess the influence to get things done in their company.

    Its likely that most readers will come from small- and medium-sized enterprises (up to a few hundred staff), andindependent companies, because of the breadth of functions that need to be analyzed and involved in change. Thesame principles also apply to larger companies, however.

  • 15

    CHAPTER

    THREE

    STRUCTURE OF THIS BOOK

    Part One, First steps with Open ERP, starts with the installation of Open ERP. If you have already installed OpenERP you can directly take your first steps on a guided tour in the Guided Tour chapter. If youre already familiar withOpen ERP or Tiny ERP you can use the Developing a real case chapter to find out how to create a new workflowfrom scratch in an empty database with nothing to distract you. Or you can skip directly to the Customer RelationshipManagement chapter in the Managing Customer Relationships part, to start with details of Open ERPs functionalmodules.

    Part Two, Managing Customer Relationships, deals with Supplier and Customer Relationship Management (SRM &CRM). Youll find the elements necessary for managing an efficient sales department there, and automating tasks tomonitor performance.

    Part Three, General Accounting, is devoted to general accounting and its key role in the management of the wholeenterprise.

    Part Four, Effective Management of Operations, handles all the operational functions of enterprise management: Hu-man Resources for managing projects, through financial analyses supplied by analytic (or cost) accounts. Youll seehow using Open ERP can help you to optimize your leadership of an enterprise.

    Part Five, Stock and Manufacturing, describes the physical movement of Stocks and their Manufacture (the transfor-mation or products and services into other products).

    Part Six, Sales and Purchasing, deals with Purchasing and Selling goods and services.

    Part Seven, Process and Document Management, is focused on the Process description and Documentation handlingthat Open ERP manages.

    Finally Part Eight, System Administration and Implementation, structured in two chapters, explains first how to ad-minister and configure Open ERP then provides a methodology for implementing Open ERP in the enterprise.

  • Open ERP, a modern approach to integrated business management, Release 1.0

    16 Chapter 3. Structure of this book

    Note: About the authorsFabien PinckaersFabien Pinckaers was only eighteen years old when he started his first company. Today, over ten years later, he hasfounded and managed several new technology companies, all based on Free / Open Source software.He originated Tiny ERP, now Open ERP, and is the director of two companies including Tiny sprl, the editor ofOpen ERP. In three years he has grown the Tiny group from one to sixty-five employees without loans or externalfund-raising, and while making a profit.He has also developed several large scale projects, such as Auction-in-Europe.com, which become the leader in theart market in Belgium. Even today people sell more art works there than on ebay.be.He is also the founder of the LUG (Linux User Group) of Louvain-la-Neuve, and of several free projects like OpenRe-port, OpenStuff and Tiny Report. Educated as a civil engineer (polytechnic), he has won several IT prizes in Europesuch as Wired and lInscene.A fierce defender of free software in the enterprise, he is in constant demand as a conference speaker and he is theauthor of numerous articles dealing with free software in the management of the enterprise.Geoff GardinerGeoff has held posts as director of services and of IT systems for international companies and in manufacturing. Hewas Senior Industrial Research Fellow at Cambridge Universitys Institute for Manufacturing where he focused oninnovation processes.He founded Seath Solutions Ltd (http://www.seathsolutions.com/) to provide services in the use of Open Source soft-ware, particularly Open ERP, for business management.Author of articles and books focusing on the processes and technology of innovation, Geoff is also an active contributorto the Open ERP project. He holds an MBA from Cranfield School of Management and an MA in Engineering andElectrical Sciences from Trinity Hall, Cambridge. He is a member of the Institution of Engineering and Technologyand of the Society of Authors.Having observed, suffered, and led process implementation projects in various organizations, he has many thoughtsto share on the successful adoption of an effective management automation tool.

  • 17

    CHAPTER

    FOUR

    DEDICATION

    From Geoff Gardiner

    My gratitude goes to my co-author, Fabien Pinckaers, for his vision and tenacity in developing Tiny ERP and OpenERP, and the team at Tiny for its excellent work on this.

    Open ERP relies on a philosophy of Open Source and on the technologies that have been developed and tuned overthe years by numerous talented people. Their efforts are greatly appreciated.

    Thanks also to my family for their encouragement, their tolerance and their constant presence.

    From Fabien Pinckaers

    I address my thanks to all of the team at Tiny for their hard work in preparing, translating and re-reading the bookin its various forms. My particular thanks to Laurence Henrion and my family for supporting me throughout all thiseffort.

  • Open ERP, a modern approach to integrated business management, Release 1.0

    18 Chapter 4. Dedication

  • 19

    Part II

    First steps with Open ERP

  • Open ERP, a modern approach to integrated business management, Release 1.0

    21

    Open ERP is an impressive software system, being simple to use and yet providing great benefits inhelping you manage your company. Its easy to install under both Windows and Linux compared withother enterprise-scale systems, and offers unmatched functionality.

    The objective of this first part of the book is to help you to start discovering it in practice.

    The first chapter, Installation and Initial Setup, gives detailed guidance for installing it. Next, in GuidedTour, youre taken on a step-by-step guided tour using the information in its demonstration database. Thenin Developing a real case you can try out a real case, from scratch in a new database, by developing acomplete business workflow that runs from purchase to sale of goods.

  • Open ERP, a modern approach to integrated business management, Release 1.0

    22

  • 23

    CHAPTER

    FIVE

    INSTALLATION AND INITIAL SETUP

    Installing Open ERP under Windows or Linux for familiarization use should take you only half an houror so and needs only a couple of operations.

    The first operation is installation of the application and database server on a server PC (thats a Windowsor Linux or Macintosh computer).

    Youve a choice of approaches for the second operation: either install a web server (most probably onthe original server PC) to use with standard web clients that can be found on anybodys PC, or installapplication clients on each intended users PC.

    When you first install Open ERP youll set up a database containing a little functionality and some demonstrationdata to test the installation.

    Figure 5.1: Options for reading this part of the book

    This chapter, Installation and Initial Setup, focuses on the installation of Open ERP so that you can be-gin to familiarize yourselves with its use. If youre not a systems administrator, or if youve already in-stalled Open ERP, or if youre planning to use an online SaaS provider, then you can skip this chapterand move straight to the next chapter, Guided Tour. If youve already used Open ERP (or Tiny ERP)a bit then you can move past that to the third chapter in this part of the book, Developing a real case.

  • Open ERP, a modern approach to integrated business management, Release 1.0

    24 Chapter 5. Installation and Initial Setup

    Note: Renaming from Tiny ERP to Open ERPTiny ERP was renamed to Open ERP early in 2008 so somebody whos already used Tiny ERP should be equally athome with Open ERP. The two names refer to the same software, so theres no functional difference between versions4.2.X of Open ERP and 4.2.X of Tiny ERP. This book applies to versions of Open ERP from 5.0.0 onwards, withreferences to earlier versions from time to time.

    Note: The SaaS, or on-demand, offerSaaS (Software as a Service) is delivered by a hosting supplier and paid in the form of a monthly subscription thatincludes hardware (servers), system maintenance, provision of hosting services, and support.You can get a months free trial on Tinys http://ondemand.openerp.com, which enables you to get started quicklywithout incurring costs for integration or for buying computer systems. Many of Tinys partner companies will accessthis, and some may offer their own similar service.This service should be particularly useful to small companies that just want to get going quickly and at low cost. Itgives them immediate access to an integrated management system thats been built on the type of enterprise architec-ture used in banks and other large organizations. Open ERP is that system, and is described in detail throughout thisbook.

    Whether you want to test Open ERP or to put it into full production, you have at least two starting points:

    evaluate it on line at http://www.openerp.com and ask Tiny for an SaaS trial hosted athttp://ondemand.openerp.com, or the equivalent service at any of Tinys partner companies,

    install it on your own computers to test it in your companys systems environment.

    There are some differences between installing Open ERP on Windows and on Linux systems, but once installed, itgives the same functions from both so you wont generally be able to tell which type of server youre using.

    Note: Linux, Windows, MacAlthough this book deals only with installation on Windows and Linux systems, the same versions are also availablefor the Macintosh on the official website of Open ERP.

    Note: Web sites for Open ERP

    Main Site: http://www.openerp.com,

    SaaS or on-demand Site: http://ondemand.openerp.com,

    Documentation Site: http://doc.openerp.com/,

    Community discussion forum where you can often receive informed assistance:http://www.openobject.com/forum.

    Tip: Current documentationThe procedure for installing Open ERP and its web server are sure to change and improve with each new version, soyou should always check each releases documentation both packaged with the release and on the website for exactinstallation procedures.

    Once youve completed this installation, create and set up a database to confirm that your Open ERP installation isworking. You can follow these early chapters in this part of the book to achieve this.

    5.1 The architecture of Open ERP

    To access Open ERP you can:

    use a web browser pointed at the Open ERP client-web server, or

  • Open ERP, a modern approach to integrated business management, Release 1.0

    5.1. The architecture of Open ERP 25

    use an application client (the GTK client) installed on each computer.

    The two methods of access give very similar facilities, and you can use both on the same server at the same time. Itsbest to use the web browser if the Open ERP server is some distance away (such as on another continent) because itsmore tolerant of time delays between the two than the GTK client is. The web client is also easier to maintain, becauseits generally already installed on users computers.

    Conversely youd be better off with the application client (called the GTK client because ofthe technology its built with) if youre using a local server (such as in the same build-ing). In this case the GTK client will be more responsive, so more satisfying to use.Note: Web client and GTK clientThe main functional difference between the two Open ERP clients is the presence of the calendar view in the webclient, which doesnt exist in the GTK client at present (versions 4.x and 5.0). Apart from that you will find that thereare small differences in their general usability.When youre changing the structure of your Open ERP installation (adding and removing modules, perhaps changinglabels) youll find the web client to be irritating because of its use of caching.Caching speeds it all up by keeping a copy of data somewhere between the server and your client, which is usuallygood. But you may have made changes to your installation that you cannot immediately see in your browser. Manyapparent faults are caused by this! The workaround is to use the GTK client during development and implementationwhere possible.The Tiny company will continue to support two clients for the foreseeable future, so you can use whichever client youprefer.

    An Open ERP system is formed from three main components:

    the PostgreSQL database server, which contains all of the databases, each of which contains all data and mostelements of the Open ERP system configuration,

    the Open ERP application server, which contains all of the enterprise logic and ensures that Open ERP runsoptimally,

    the web server, a separate application called the Open Object client-web, which enables you to connect toOpen ERP from standard web browsers and is not needed when you connect using a GTK client.

  • Open ERP, a modern approach to integrated business management, Release 1.0

    26 Chapter 5. Installation and Initial Setup

    Figure 5.2: The architecture of Open ERP

    Note: Terminology: client-web server or client?The client-web component can be thought of as a server or a client depending on your viewpoint.It acts as a web server to an end user connecting from a web browser, but it also acts as a client to the Open ERPapplication server just as a GTK application client does.So in this book its context will determine whether the client-web component is referred to as a server or a client.

    Note: eTinyThe web application used to be known as eTiny. Its name changed to client-web as Tiny ERP was renamed toOpen ERP, but its characteristics have generally stayed the same.

    Note: PostgreSQL, the relational and object database management system.Its a free and open-source high-performance system that compares well with other database management systemssuch as MySQL and FirebirdSQL (both free), Sybase, DB2 and Microsoft SQL Server (all proprietary). It runs on alltypes of Operating System, from Unix/Linux to the various releases of Windows, via Mac OS X, Solaris, SunOS andBSD.

    These three components can be installed on the same server or can be distributed onto separate computer servers ifperformance considerations require it.

    If you choose to run only with GTK clients you wont need the third component the client-web server at all. Inthis case Open ERPs GTK client must be installed on the workstation of each Open ERP user in the company.

    5.2 The installation of Open ERP

    Whether youre from a small company investigating how Open ERP works, or on the IT staff of a larger organizationand have been asked to assess Open ERPs capabilities, your first requirement is to install it or to find a workinginstallation.

    The table below summarizes the various installation methods that will be described in the following sections.

  • Open ERP, a modern approach to integrated business management, Release 1.0

    5.2. The installation of Open ERP 27

    Table 5.1: Comparison of the different methods of installation on Windows or Linux

    Method AverageTime

    Level ofComplexity

    Notes

    All-in-oneWindowsInstaller

    A fewminutes

    Simple Very useful for quick evaluations because it installs all of thecomponents pre-configured on one computer (using the GTKclient).

    Independentinstallation onWindows

    Half anhour

    Medium Enables you to install the components on different computers.Can be put into production use.

    Ubuntu Linuxpackages

    A fewminutes

    Simple Simple and quick but the Ubuntu packages arent always up todate.

    From source, forall Linux systems

    More thanhalf anhour

    Medium toslightlydifficult

    This is the method recommended for production environmentsbecause its easy to keep it up to date.

    Each time a new release of Open ERP is made, Tiny supplies a complete Windows auto-installer for it. This containsall of the components you need the PostgreSQL database server, the Open ERP application server and the GTKapplication client.

    This auto-installer enables you to install the whole system in just a few mouse-clicks. The initial configuration is set upduring installation, making it possible to start using it very quickly as long as you dont want to change the underlyingcode. Its aimed at the installation of everything on a single PC, but you can later connect GTK clients from other PCs,Macs and Linux boxes to it as well.

    The first step is to download the Open ERP installer. At this stage you must choosewhich version to install the stable version or the development version. If youre plan-ning to put it straight into production youre strongly advised to choose the stable version.Note: Stable versions and development versionsOpen ERP development proceeds on two parallel tracks: stable versions and development versions.New functionality is integrated into the development branch. This branch is more advanced than the stable branch,but it can contain undiscovered and unfixed faults. A new development release is made every month or so, and Tinyhave made the code repository available so you can download the very latest revisions if you want.The stable branch is designed for production environments. Releases of new functionality there are made only aboutonce a year after a long period of testing and validation. Only fault fixes are released through the year on the stablebranch.

    To download the version of Open ERP for Windows, follow these steps:

    1. Navigate to the site http://openerp.com.

    2. Click Downloads on the menu at the left then, under Windows Installers, All in One.

    3. This brings up the demonstration version Windows installer, currently openerp-allinone-setup-5.0.0-3.

    4. Save the file on your PC - its quite a substantial size because it downloads everything including the PostgreSQLdatabase system, so will take some time.

    To install Open ERP and its database you must be signed in as an Administrator on your PC. Double- click the installerfile to install it and accept the default parameters on each dialog box as you go.

    If you had previously tried to install the all-in-one version of Open ERP, you have to uninstall that first because variouselements of a previous installation could interfere with your new installation. Make sure that all Tiny ERP, Open ERPand PostgreSQL applications are removed: youre likely to have to restart your PC to finish removing all traces ofthem.

    The Open ERP client can be opened, ready to use the Open ERP system, once you have completed the allin-oneinstallation. The next step consists of setting up the database, and is covered in the final section of this chapterCreating the database.

  • Open ERP, a modern approach to integrated business management, Release 1.0

    28 Chapter 5. Installation and Initial Setup

    5.2.1 Independent installation on Windows

    System administrators can have very good reasons for wanting to install the various components of a Windows instal-lation separately. For example, your company may not support the version of PostgreSQL or Python thats installedautomatically, or you may already have PostgreSQL installed on the server youre using, or you may want to installthe database server, application server and web server on separate hardware units.

    For this situation you can get separate installers for the Open ERP server and client from the same location as theall-in-one auto-installer. Youll also have to download and install a suitable version of PostgreSQL independently.

    You must install PostgreSQL before the Open ERP server, and you must also set it up with a user and password so thatthe Open ERP server can connect to it. Tinys web-based documentation gives full and current details.

    Connecting users on other PCs to the Open ERP server

    To connect other computers to the Open ERP server you must set the server up so that its visible to the other PCs, andinstall a GTK client on each of the those PCs:

    1. Make your Open ERP server visible to other PCs by opening the Windows Firewall in the Control Panel, thenasking the firewall to make an exception of the Open ERP server. In the Exceptions tab of Windows Firewallclick on Add a program... and choose Open ERP Server in the list provided. This step enables other computersto see the Open ERP application on this server.

    2. Install the Open ERP client (openerp-client-5.X.exe), which you can download in the same way as you down-loaded the other Open ERP software, onto the other PCs.

    Tip: Version matchingYou must make sure that the version of the client matches that of the server. The version number is given as part ofthe name of the downloaded file. Although its possible that some different revisions of client and server will functiontogether, theres no certainty about that.

    To run the client installer on every other PC youll need to have administrator rights there. The installation is auto-mated, so you just need to guide it through its different installation steps.

    To test your installation, start by connecting through the Open ERP client on the server machine while youre stilllogged in as administrator.

    Note: Why sign in as a PC Administrator?Youd not usually be signed on as a PC administrator when youre just running the Open ERP client, but if there havebeen problems in the installation its easier to remain as an administrator after the installation so that you can makeany necessary fixes than to switch user as you alternate between roles as a tester and a software installer.

    Start the GTK client on the server through the Windows Start menu there. The main client window appears,identifying the server youre connected to (which is localhost your own server PC by default). If the message

    No database found, you must create one appears then youve successfully connected to an Open ERP servercontaining, as yet, no databases.

  • Open ERP, a modern approach to integrated business management, Release 1.0

    5.2. The installation of Open ERP 29

    Figure 5.3: Dialog box on connecting a GTK client to a new Open ERP server

    Note: Connection modesIn its default configuration at the time of writing, the Open ERP client connects to port 8069 on the server using theXML-RPC protocol (from Linux) or port 8070 using the NET-RPC protocol instead (from Windows). You can useeither protocol from either operating system. NET-RPC is quite a bit quicker, although you may not notice that on theGTK client in normal use. Open ERP can run XML-RPC, but not NET-RPC, as a secure connection.

    The all-in-one installer also provides a web server, but this was not yet working at the time of writing.

    Resolving errors with a Windows installation

    If you cant get Open ERP to work after installing your Windows system youll find some ideas for resolving thisbelow:

    1. Is the Open ERP application working? Signed in to the server as an administrator, stop and restart the serviceusing Stop Service and Start Service from the menu Start Programs OpenERP Server .

    2. Is the Open ERP application server set up correctly? Signed in to the server as Administrator, open the fileopenerp-server.conf in C:\Program Files\OpenERP AllInOne and check its content. Thisfile is generated during installation with information derived from the database. If you see something strange itsbest to entirely reinstall the server from the demonstration installer rather than try to work out whats happening.

  • Open ERP, a modern approach to integrated business management, Release 1.0

    30 Chapter 5. Installation and Initial Setup

    Figure 5.4: Typical Open ERP configuration file

    3. Is your PostgreSQL server running? Signed in as administrator, select Stop Service from the menu Start Programs PostgreSQL. If, after a couple of seconds, you can read The PostgreSQL4OpenERP service hasstopped then you can be reasonably sure that the database server was working. Restart PostgreSQL.

    4. Does PostgreSQL work at all? Still in the PostgreSQL menu, start the pgAdmin III application which youcan use to explore the database. Double-click on the PostgreSQL4OpenERP connection. You can find thepassword in the Open ERP server configuration file. If the database server is working youll be able to see someinformation about the empty database. If its not then an error message will appear.

    5. Are your client programs correctly installed? If your Open ERP GTK clients havent started then the swiftestapproach is to reinstall them.

    6. Can remote client computers see the server computer at all? Check this by opening a command prompt win-dow (enter cmd in the window Start Run... ) and enter ping there (where represents the IP address of the server). The server should respond with a reply.

    7. Have you changed any of the servers parameters? At this point in the installation the port number of the servermust be 8069 using the protocol XML-RPC.

    8. Is there anything else in the servers history that can help you identify the problem? Open the fileopenerp-server.log in C:\Program Files\OpenERP AllInOne(which you can only do whenthe server is stopped) and scan through the history for ideas. If something looks strange there, contributors tothe Open ERP forums can often help identify the reason.

  • Open ERP, a modern approach to integrated business management, Release 1.0

    5.2. The installation of Open ERP 31

    5.2.2 Installation on Linux (Ubuntu)

    This section guides you through installing the Open ERP server and client on Ubuntu, one of the most popular Linuxdistributions. It assumes that youre using a recent release of Desktop Ubuntu with its graphical user interface on adesktop or laptop PC.

    Note: Other Linux distributionsInstallation on other distributions of Linux is fairly similar to installation on Ubuntu. Read this section of the bookso that you understand the principles, then use the online documentation and the forums for your specific needs onanother distribution.

    For information about installation on other distributions, visit the documentation section by following ProductDoc-umentation on http://www.openerp.com. Detailed instructions are given there for different distributions and releases,and you should also check if there are more up to date instructions for the Ubuntu distribution as well.

    Installation of Open ERP from packages

    At the time of writing this book, Ubuntu hadnt yet published packages for Open ERP, so this section describes theinstallation of version 4.2 of Tiny ERP. This is very similar to Open ERP and so can be used to test the software.

    Heres a summary of the procedure:

    1. Start Synaptic Package Manager, and enter your root password as required.

    2. Check that the repositories main universe and restricted are enabled.

    3. Search for a recent version of PostgreSQL, for example postgresql-8.3then select it for installation alongwith its dependencies.

    4. Search for tinyerp then select tinyerp-client and tinyerp-server for installation along with theirdependencies. Click Update Now to install it all.

    5. Close Synaptic Package Manager.

    Installing PostgreSQL results in a database server that runs and restarts automatically when the PC is turned on. If allgoes as it should with the tinyerp-server package then tinyerp-server will also install, and restart automatically whenthe PC is switched on.

    Start the Tiny/Open ERP GTK client by clicking its icon in the Applications menu, or by opening a terminal windowand typing tinyerp-client . The Open ERP login dialog box should open and show the message No databasefound you must create one!.

    Although this installation method is simple and therefore an attractive option, its better to install Open ERP using aversion downloaded from http://openerp.com. The downloaded revision is likely to be far more up to date than thatavailable from a Linux distribution.

    Note: Package versionsMaintaining packages is a process of development, testing and publication that takes time. The releases in Open ERP(or Tiny ERP) packages are therefore not always the latest available. Check the version number from the informationon the website before installing a package. If only the third digit group differs (for example 5.0.1 instead of 5.0.2)then you may decide to install it because the differences may be minor fault fixes rather than functionality changesbetween the package and the latest version.

    Manual installation of the Open ERP server

    In this section youll see how to install Open ERP by downloading it from the site http://openerp.com, and how toinstall the libraries and packages that Open ERP depends on, onto a desktop version of Ubuntu. Heres a summary of

  • Open ERP, a modern approach to integrated business management, Release 1.0

    32 Chapter 5. Installation and Initial Setup

    the procedure:

    1. Navigate to the page http://openerp.com with your web browser,

    2. Click Downloads on the left menu,

    3. Download the client and server files from the Sources (Linux) section into your home directory (or some otherlocation if youve defined a different download area).

    To download the PostgreSQL database and all of the other dependencies for Open ERP from packages:

    1. Start Synaptic Package Manager, and enter the root password as required.

    2. Check that the repositories main universe and restricted are enabled.

    3. Search for a recent version of PostgreSQL (such as postgresql-8.3 then select it for installation along withits dependencies.

    4. Select all of Open ERPs dependences, an up-to-date list of which should be found in the installation documentson Tinys website, then click Update Now to install them.

    Note: Python programming languagePython is the programming language thats been used to develop Open ERP. Its a dynamic, non-typed languagethat is object-oriented, procedural and functional. It comes with numerous libraries that provide interfaces to otherlanguages and has the great advantage that it can be learnt in only a few days. Its the language of choice for largeparts of NASAs, Googles and many other enterprises code.For more information on Python, explore http://www.python.org.

    Once all these dependencies and the database are installed, install the server itself using the instructions on the website.

    Open a terminal window to start the server with the command sudo -i -u postgres openerp-server ,which should result in a series of log messages as the server starts up. If the server is correctly installed, the message[...] waiting for connections... should show within 30 seconds or so, which indicates that the server is waiting for a

    client to connect to it.

    Figure 5.5: Open ERP startup log in the console

    Manual installation of Open ERP GTK clients

    To install an Open ERP GTK client, follow the steps outline on the website installation document for your particularoperating system.

    Tip: Survey: Dont Cancel!When you start the GTK client for the first time, a dialog box appears asking for various details that are intended tohelp the Tiny company assess the prospective user base for its software.If you click the Cancel button, the window goes away but Open ERP will ask the same questions again next timeyou start the client. Its best to click OK, even if you choose to enter no data, to prevent that window reappearing nexttime.

  • Open ERP, a modern approach to integrated business management, Release 1.0

    5.2. The installation of Open ERP 33

    Figure 5.6: Open ERP client at startup

    Open a terminal window to start the client using the command openerp-client. When you start the client on thesame Linux PC as the server youll find that the default connection parameters will just work without needing anychange. The message No database found, you must create one! shows you that the connection to the server has beensuccessful and you need to create a database on the server.

    Creating the database

    You can connect other GTK clients over the network to your Linux server. Before youleave your server, make sure you know its network address either by its name (suchas mycomputer.mycompany.net ) or its IP address (such as 192.168.0.123 ).Note: Different networksCommunications between an Open ERP client and server are based on standard protocols. You can connect Windowsclients to a Linux server, or vice versa, without problems. Its the same for Mac versions of Open ERP you canconnect Windows and Linux clients and servers to them.

    To install an Open ERP client on a computer under Linux, repeat the procedure shown earlier in this section. You canconnect different clients to the Open ERP server by modifying the connection parameters on each client. To do that,click the Change button on the connection dialog and set the following field as needed:

    Server : name or IP address of the server over the network,

    Port : the port, whose default is 8069 or 8070,

    Connection protocol : XML-RPC or NET-RPC .

  • Open ERP, a modern approach to integrated business management, Release 1.0

    34 Chapter 5. Installation and Initial Setup

    Figure 5.7: Dialog box for defining connection parameters to the server

    Its possible to connect the server to the client using a secure protocol to prevent other network users from listening in,but the installation described here is for direct unencrypted connection.

    If your Linux server is protected by a firewall youll have to provide access to port 8069or 8070for users onother computers with Open ERP GTK clients.

    Installation of an Open ERP web server

    Just as you installed a GTK client on a Linux server, you can also install the Open ERP client-web server. You caninstall it from sources after installing its dependencies from packages as you did with the Open ERP server, but Tinyhave provided a simpler way to do this for eTiny using a system known as ez_setup.

    Before proceeding, confirm that your Open ERP installation is functioning correctly with a GTK client. If its notyoull need to go back now and fix it, because you need to be able to use it fully for the next stages.

    To install client-web follow the up-to-date instructions in the installation document on the website.

    Note: Ez toolEz is the packaging system used by Python. It enables the installation of programs as required just like the packagesused by a Linux distribution. The software is downloaded across the network and installed on your computer byez_install.ez_setup is a small program that installs ez_install automatically.

    The Open ERP Web server connects to the Open ERP server in the same way as an Open ERP client using the NET-RPC protocol. Its default setup corresponds to that of the Open ERP server youve just installed, so should connectdirectly at startup.

    1. At the same console as youve just been using, go to the Openerp web directory by typing cd openerp-web-5.X.

    2. At a terminal window type start-openerp-web to start the Open ERP Web server.

  • Open ERP, a modern approach to integrated business management, Release 1.0

    5.2. The installation of Open ERP 35

    Figure 5.8: Open ERP web client at startup

    You can verify the installation by opening a web browser on the server and navigating to http://localhost:8080 toconnect to eTiny as shown in the figure Open ERP web client at startup. You can also test this from another computerconnected to the same network if you know the name or IP address of the server over the network your browsershould be set to http://:8080 for this.

    Verifying your Linux installation

    Youve used default parameters so far during the installation of the various components. If youve had problems,or you just want to set this up differently, the following points provide some indicators about how you can set yourinstallation up.

    Tip: psql and pgAdmin toolspsql is a simple client, executed from the command line, thats delivered with PostgreSQL. It enables you to executeSQL commands on your Open ERP database.If you prefer a graphical utility to manipulate your database directly you can install pgAdmin III (itis commonly installed automatically with PostgreSQL on a windowing system, but can also be found athttp://www.pgadmin.org/ ).

    1. The PostgreSQL database starts automatically and listens locally on port 5432 as standard: check this by enteringsudo netstat -anpt at a terminal to see if port 5432 is visible there.

    2. The database system has a default role of postgres accessible by running under the Linux postgres user:check this by entering sudo su postgres -c psql at a terminal to see the psql startup message thentype \q to quit the program.

    3. Start the Open ERP server from the postgres user (which enables it to access the PostgreSQL database) by typingsudo su postgres -c tinyerp-server.

    4. If you try to start the Open ERP server from a terminal but get the message socket.error: (98,Address already in use) then you might be trying to start Open ERP while an instance of

  • Open ERP, a modern approach to integrated business management, Release 1.0

    36 Chapter 5. Installation and Initial Setup

    Open ERP is already running and using the sockets that youve defined (by default 8069 and 8070). If thatsa surprise to you then you may be coming up against a previous installation of Open ERP or Tiny ERP, orsomething else using one or both of those ports.

    Type sudo netstat -anpt to discover what is running there, and record the PID. You can check that thePID orresponds to a program you can dispense with by typing ps aux | grep and you can thenstop the program from running by typing sudo kill . You need additional measures to stop it fromrestarting when you restart the server.

    5. The Open ERP server has a large number of configuration options. You can see what they are by starting theserver with the argument -help By efault the server configuration is stored in the file .terp_serverrc inthe users home directory (and for the postgres user that directory is /var/lib/postgresql .

    6. You can delete the configuration file to be quite sure that the Open ERP server is starting with just the defaultoptions. It is quite common for an upgraded system to behave badly because a new version server cannot workwith options from a previous version. When the server starts without a configuration file it will write a new oneonce there is something non-default to write to it it will operate using defaults until then.

    7. To verify that the system works, without becoming entangled in firewall problems, you can start the Open ERPclient from a second terminal window on the server computer (which doesnt pass through the firewall). Con-nect using the XML-RPC protocol on port 8069 or NET-RPC on port 8070. The server can use both portssimultaneously. The window displays the log file when the client is started this way.

    8. The client setup is stored in the file .terprc in the users home directory. Since a GTK client can be startedby any user, each user would have their setup defined in a configuration file in their own home directory.

    9. You can delete the configuration file to be quite sure that the Open ERP client is starting with just the defaultoptions. When the client starts without a configuration file it will write a new one for itself.

    10. The web server uses the NET-RPC protocol. If a GTK client works but the web server doesnt then the problemis either with the NET-RPC port or with the web server itself, and not with the Open ERP server.

    Hint: One server for several companiesYou can start several Open ERP application servers on one physical computer server by using different ports. If youhave defined multiple database roles in PostgreSQL, each connected through an Open ERP instance to a different port,you can simultaneously serve many companies from one physical server at one time.

    5.3 Database creation

    Use the technique outlined in this section to create a new database, openerp_ch01 . This database will contain thedemonstration data provided with Open ERP and a large proportion of the core Open ERP functionality. Youll needto know your super administrator password for this or youll have to find somebody who does have it to create this

    seed database.Note: The super-administrator passwordAnyone who knows the super-administrator password has complete access to the data on the server able to read,change and delete any of the data in any of the databases there.After first installation, the password is admin. You can change it through the GTK client from the menu File Databases Administrator Password, or through the web client by logging out (click the Logout link), clickingDatabases on the login screen, and then clicking the Password button on the Management screen. This password isstored in a configuration file outside the database, so a server systems administrator can change it if you forget it.

  • Open ERP, a modern approach to integrated business management, Release 1.0

    5.3. Database creation 37

    Figure 5.9: Changing the super-administrator password through the web client

    5.3.1 Creating the database

    If youre using the GTK client, choose Files Databases New database in the menu at the top left. Enter thesuper-administrator password, then the name of the new database youre creating.

    Figure 5.10: Creating a new database through the GTK client

    If youre using the web client, click Databases on the login screen, then Create on the database management page.Enter the super-administrator password, and the name of the new database youre creating.

    In both cases youll see a checkbox that determines whether you load demonstration data or not. The consequences ofchecking this box or not affect the whole use of this database.

    In both cases youll also see that you can choose the Administrator password. This makes your database quite securebecause you can ensure that it is unique from the outset. (In fact many people find it hard to resist admin as theirpassword!)

  • Open ERP, a modern approach to integrated business management, Release 1.0

    38 Chapter 5. Installation and Initial Setup

    5.3.2 Database openerp_ch01

    Wait for the message showing that the database has been successfully created, along with theuser accounts and passwords (admin/XXXX and demo/demo ). Now youve created thisseed database you can extend it without having to know the super-administrator password.Tip: User AccessThe combination of username/password is specific to a single database. If you have administrative rights to a databaseyou can modify all users. Alternatively you can install the users_ldap module, which manages the authenticationof users in LDAP (the Lightweight Directory Access Protocol, a standard system), and connect it to several Open ERPdatabases. Using this, many databases can share the same user account details.

    Note: Failure to create a databaseHow do you know if youve successfully created your new database? Youre told if the database creation has beenunsuccessful. If you have entered a database name using prohibited characters (or no name, or too short a name) youwill be alerted by the dialog box Bad database name! explaining how to correct the error. If youve entered the wrongsuper-administrator password or a name already in use (some names can be reserved without your knowledge), youllbe alerted by the dialog box Error during database creation!.

    Connect to the database openerp_ch01 that you just created, using the default administrator account.

    If this is the first time youve connected to this database youll be asked a series of questions to define the databaseparameters:

    1. Select a profile : select Minimal Profile and click Next.

    2. Company Details : replace the proposed default of Tiny sprl by your own company name, complete asmuch of your address as you like, and add some lines about your company, such as a slogan and any statutoryrequirements, to the header and footer fields. Click Next.

    3. Summary : check the information and go back to make any modifications you need before installation. Thenclick Install.

    4. Installation Completed : click Ok.

    Once configuration is complete youre connected to your Open ERP system. Its functionality is very limited becauseyouve selected a minimal installation, but this is sufficient to demonstrate that your installation is working.

  • Open ERP, a modern approach to integrated business management, Release 1.0

    5.3. Database creation 39

    Figure 5.11: Defining your company during initial database configuration

    5.3.3 Managing databases

    As a super-administrator youve not only got rights to create new databases, but also to:

    delete databases,

    backup databases,

    restore databases.

    All of these operations can be carried out from the menu File Databases... Backupdatabases in the GTK client, or from the Database button in the web clients Login screen.Tip: Duplicating a databaseTo duplicate a database you can:

    1. make a backup file on your PC from this database.

    2. restore this database from the backup file on your PC, giving it a new name as you do so.

    This can be a useful way of making a test database from a production database. You can try out the operation of a newconfiguration, new modules, or just the import of new data.

    A system administrator can configure Open ERP to restrict access to some of these database functions so that yoursecurity is enhanced in normal production use.

    You are now ready to use databases from your installation to familiarize yourself with the administration and use ofOpen ERP.

  • Open ERP, a modern approach to integrated business management, Release 1.0

    40 Chapter 5. Installation and Initial Setup

    5.4 New Open ERP functionality

    The database youve created and managed so far is based on the core Open ERP functionality that you installed. Thecore system is installed in the file system of your Open ERP application server, but only installed into an Open ERPdatabase as you require it, as is described in the next chapter, Guided Tour.

    What if want to update whats there, or extend whats there with additional modules?

    To update what you have, youd install a new instance of Open ERP using the same techniques as describedearlier in this section, Database creation.

    To extend what you have, youd install new modules in the addons directory of your current Open ERPinstallation. There are several ways of doing that.

    In both cases youll need briefly to be a root user or Administrator of your Open ERP application server.

    5.4.1 Extending Open ERP

    To extend Open ERP youll need to copy modules into the addons directory. Thats in your serversopenerp-server directory (which differs between Windows, Mac and some of the various Linux distributionsand not available at all in the Windows all-in-one installer). If you look there youll see existing modules such asproduct and purchase. A module can be provided in the form of files within a directory or a a zip-format filecontaining that same directory structure.

    You can add modules in two main ways through the server, or through the client. To add new modules through theserver is a conventional systems administration task. As rootuser or other suitable user, youd put the module in theaddons directory and change its permissions to match those of the other modules.

    To add new modules through the client you must first change the permissions of the addonsdirectory ofthe server, so that it is writable by the server. That will enable you to install Open ERP modules us-ing the Open ERP client (a task ultimately carried out on the application server by the server software).Tip: Changing permissionsA very simple way of changing permissions on the Linux system youre using to develop an Open ERP application isto execute the command sudo chmod 777 (where is the full path to the addonsdirectory, a location like /usr/lib/python2.5/site-packages/openerp- server/addons).

    Any user of Open ERP who has access to the relevant administration menus can then upload any new functionality,so youd certainly disable this capability for production use. Youll see examples of this uploading as you make yourway through this book.

  • 41

    CHAPTER

    SIX

    GUIDED TOUR

    Starting to discover Open ERP, using demonstration data supplied with the system, is a good way tofamiliarize yourself with the user interface. This guided tour provides you with an introduction to manyof the available system features.

    Youd be forgiven a flicker of apprehension when you first sit at your computer to connect to Open ERP, since ERPsystems are renowned for their complexity and for the time it takes to learn how to use them. These are, after all,Enterprise Resource Planning systems, capable of managing most elements of global enterprises, so they should becomplicated, shouldnt they? But even if this is often the case for proprietary software, Open ERP is a bit of anexception in the class of management software.

    Despite its comprehensiveness, Open ERPs interface and workflow management facilities are quite simple and intu-itive to use. For this reason Open ERP is one of the few software packages with reference customers in both very smallbusinesses (typically requiring simplicity) and large accounts (typically requiring wide functional coverage).

    A two-phase approach provides a good guide for your first steps with Open ERP:

    1. Using a database containing demonstration data to get an overview of Open ERPs functionality (described inthis chapter, Guided Tour)

    2. Setting up a clean database to configure and populate a limited system for yourself (described in the next chapter,Developing a real case).

    To read this chapter effectively, make sure that you have access to an Open ERP server. The description in this chapterassumes that youre using the Open ERP web client unless it states otherwise. The general functionality differs littlefrom one client to the other.

    6.1 Database creation

    Use the technique outlined in Installation and Initial Setup to create a new database, openerp_ch02 . This databasewill contain the demonstration data provided with Open ERP and a large proportion of the core Open ERP functional-ity. Youll need to know your super administrator password for this or youll have to find somebody who does haveit to create this seed database.

    Start the database creation process from the Welcome page by clicking Databases and then completing the followingfields on the Create new database form:

    Super admin password : by default its admin , if you or your system administrator havent changed it,

    New database name : openerp_ch02 ,

    Load Demonstration data checkbox: checked ,

  • Open ERP, a modern approach to integrated business management, Release 1.0

    42 Chapter 6. Guided Tour

    Default Language : English ,

    Administrator password : admin (because its easiest to remember at this stage, but obviously completelyinsecure),

    Confirm password : admin .

    6.2 To connect to Open ERP

    Since this is the first time youve connected to it youll have to go through the Setup wizard in steps:

    1. Select a profile : select Minimal Profile and click Next.

    2. At the Define Main Company step you should select your own Company Name and Currency, and addressdetails on the first tab General Information; and add more details on the second tab Report Informationincluding a logo, if you have one, that appears on reports. Click Next.

    3. At the Summary page you can go back to change details if you need. Click the Install button.

    4. Finally, at the Installation done page, click Start Configuration.

    Configuration consists of a set of wizards that help you through options for the installed modules. Hardly anything isinstalled so this is a very simple process at the moment.

    1. At the first screen click Continue to go into the first wizard. Choose View Mode : Simplified Interface andthen click Set to save it.

    2. Click Skip Step to step over the next wizard, which would enable you to add other users.

    3. Youve now reached the end of the configuration so click Continue to start using the system as the Administrator.

    Once youre displaying the main menu youre able to see the following screen items, as shown in screenshot The MainMenu of the openerp_ch02 database:

    the Preferences toolbar to the top right, showing the user name, links to the Home page, Preferences, Aboutand Logout,

    just below youll find information about the Request system,

    links to the MAIN MENU and the SHORTCUTS,

    information about copyright and the database youre logged into at the bottom of the page,

    the main contents of the window with by the menu toolbar to the left: links generally line up on the right butthere are none to show at the moment.

  • Open ERP, a modern approach to integrated business management, Release 1.0

    6.2. To connect to Open ERP 43

    Figure 6.1: The Main Menu of the openerp_ch02 database

    Two menus are available on the left:

    Partners,

    Administration.

    6.2.1 Preferences toolbar

    When youre connected to Open ERP the Preferences toolbar indicates which user youre connected as. So it shouldcurrently be showing Welcome Administrator (unless you logged in as another user and its reflecting the name ofthat user instead).

    Youll find a link to the Home page to its right. This takes you to either the dashboard or the available menus,depending on the user configuration. In the case of the openerp_ch02database so far the Home page is theMain Menu. But in general each user of the system is presented with a dashboard thats designed to showperformance indicators and urgent documents that are most useful to someone of the users position in the com-pany. Youll see how to assign dashboards to different users in a later chapter, Configuration & Administration.Tip: Multi-nationals and time zonesIf you have users in different countries, they can configure their own timezone. Timestamp displays are then adjustedby reference to the users own localization setting.So if you have a team in India and a team in England, the times will automatically be converted. If an Indian employeesets her working hours from 9 to 6 that will be converted and saved in the servers timezone. When the English userswant to set up a meeting with an Indian user, the Indian users available time will be converted to English time.

    The next element in the Toolbar is a link to Preferences. By clicking that link you reach a page where the current usercan set their password, a timezone, a working language, and a signature:

    The Password field gives the user the opportunity to change their own password. You should take steps (perhapswritten policies) to prevent users making these too trivial.

    The Language field enables the users working language to be changed. But first the system must be loadedwith other languages for the user to be able to choose an alternative, which is described in the next subsectionof this chapter. This is a mandatory field, although might initially be set as blank.

    The Timezone setting indicates the users location to Open ERP. This can be different from that of the server.All of the dates in the system are converted to the users timezone automatically.

    The Signature field gives the user a place for the signature attached to messages sent from within Open ERP.

  • Open ERP, a modern approach to integrated business management, Release 1.0

    44 Chapter 6. Guided Tour

    The About link gives information about the development of the Open ERP software and various links to other infor-mation.

    The Logout link enables you to logout and return to the original login page. You can then login to another database,or to the same database as another user. This page also gives you access to the super-administrator functions formanaging databases on this server.

    The Requests link sits just below this toolbar. It is only visible if youre logged into a database. If your database isnew it will say No request. You can click on that link to look at requests that have been sent to you at any time.

    Installing a new language

    Each user of the system can work in his or her own language. More than twenty languages are currently availablebesides English. Users select their working language using the Preferences link. You can also assign a language toa partner (customer or supplier), in which case all the documents sent to that partner will be automatically translatedinto that language.

    Attention:

    More information about languagesThe base version of Open ERP is translated into the following languages: English, German, Chinese, Spanish,Italian, Hungarian, Dutch, Portuguese, Romanian, Swedish and Czech.But other languages are also available: Arabic, Afghan, Austrian, Bulgarian, Indonesian, Finnish, Thai, Turkishand Vietnamese..

    As administrator you can install a new main working language into the system.

    1. Select Administration in the Menu Toolbar and click Translations Load an Official Translation in the mainmenu window,

    2. Select the language to install, French for example, and click on Start Installation,

    3. When the message Installation done appears in the Language file loaded window, click OK to return to themenu. (Your system will actually need the French locale loaded to be able to do this, so you may not besuccessful here.)

    To see the effects of this installation change the preferences of your user to change the working language (you may firstneed to ensure that you have explicitly selected English as your language, rather than keep the default, before youregiven the French option). The main menu is immediately translated in the selected language. If youre using the GTKclient youll first have to close the menu then open a new main menu to start seeing things in the new language.

    Note: Navigating the menuFrom this point in the book navigation from the main menu is written as a series of menu entries connected by thecharacter. Instead of seeing Select Administration in the Menu toolbar then click Translations > Load an OfficialTranslation youll just get use menu Administration Translations Load an Official Translation .

    Requests as a mechanism for internal communication

    Requests are a powerful communication mechanism between users of the system. Theyre also used by Open ERPitself to send system messages to users.

    They have distinct advantages over traditional emails:

    requests are linked to other Open ERP documents,

    an events history is attached to the request,

  • Open ERP, a modern approach to integrated business management, Release 1.0

    6.2. To connect to Open ERP 45

    you can monitor events effectively from the messages theyve sent.

    Open ERP uses this mechanism to inform users about certain system events. For example if theres a problem con-cerning the procurement of a product a request is sent by Open ERP to the production manager.

    Send a request to get an understanding of its functionality:

    1. Click on the Requests link that should currently be showing No Requests. This opens a window that lists all ofyour waiting requests.

    2. Click New to create and send a new request.

    3. Complete the subject of the request, such as How are things? then give a description of the enquiry in thefield.

    4. Click the Search button to the right of the To field and select Administrator in the window that opens (thatsthe user that youre already connected as).

    5. You can then link this request to other system documents using the References field, which could, for example,be a partner or a quotation or a disputed invoice.

    6. Click Send to send the request to the intended recipient thats yourself in this case. Then click MAIN MENUto return to the original screen.

    Figure 6.2: Creating a new request

    To check your requests:

    1. Click on the link to the right of the Requests label to open a list of your requests. (Its possible that youll stillsee the statement No Requests because this information is updated periodically ather than instantly.) The list ofrequests then opens and you can see the requests youve been sent there.

  • Open ERP, a modern approach to integrated business management, Release 1.0

    46 Chapter 6. Guided Tour

    2. Click the Edit icon, represented by a pencil, at the right hand end of the request line. That opens the request inedit mode.

    3. You can then click the Reply button and make your response in the Request field that appears in place of theoriginal message.

    4. Click Send to save your response and send it to the original sender.

    Note: Requests vs. emailThe advantage of an Open ERP request compared with a set of emails about one thread of discussion is that arequest contains all of the conversation in one place. You can easily monitor a whole discussion with the appropriatedocuments attached, and quickly review a list of incomplete discussions with the history within each request.

    Look at the request and its history, then close it.

    1. Click on the History tab in the Request form to see the original request and all of the responses. By clicking oneach line you could get more information on each element.

    2. Return to the first tab, Request and click End of Request to set it to closed. This then appears greyed out.

    The request is no longer active. Its not visible to searches and wont appear in your list of waiting requests.

    Tip: Trigger datesYou can send a request with a future date. This request wont appear in the recipients waiting list until the indicateddate. This mechanism is very useful for setting up alerts before an important event.

    6.2.2 Configuring Users

    The database you created contains minimal functionality but can be extended to include all of the potential function-ality available to Open ERP. About the only functions actually available in this minimal database are Partners andCurrencies and these only because the definition of your main company required this. And because you chose toinclude demonstration data, both Partners and Currencies were installed with some samples. Because you logged inas Administrator, you have all the access you need to configure users. Click Administration Users Users todisplay the list of users defined in the system. A second user, Demo User , is also present in the system as part ofthe demonstration data. Click the Demo User name to open a non-editable form on that user.

    Click the Security tab to see that the demo user is a member of only the Employee group, has no roles and issubject to no specialized rules. The admin user is different, as you can see if you follow the same sequence to re-view the its definition. Its a member of the admin group, which gives it more advanced rights to configure new users.Tip: Roles, Groups and UsersUsers and groups provide the structure for specifying access rights to different documents. Their setup answers thequestion Who has access to what?Roles are used in business processes for permitting or blocking certain steps in the workflow of a given document. Forexample you can assign the role of approving an invoice. Roles answer the question Who should do what?

    Click Administration Users Groups below the main menu to open the list of groups defined in the system. If youopen the form view of the admin group by clicking its name in the list, the first tab give you the list of all the userswho belong to this group.

    Click the Security tab and it gives you details of the access rights for that group. These are detailed later in Config-uration & Administration, but you can already see there further up in the window, the list of menus reserved for theadmin group. By convention, the admin in Open ERP has rights of access to the Configuration menu in each section.So Partners / Configuration is found in the list of access rights but Partners isnt found there becauseits accessible to all users.

  • Open ERP, a modern approach to integrated business management, Release 1.0

    6.2. To connect to Open ERP 47

    You can create some new users to integrate them into the system. Assign them to predefined groups to grant themcertain access rights. Then try their access rights when you login as these users. Management defines these accessrights as described in Configuration & Administration.

    Note: Changes to default access rightsNew versions of Open ERP differ from earlier versions of Open ERP and Tiny ERP in this area: many groups havebeen predefined and access to many of the menus and objects are keyed to these groups by default. This is quite acontras