0%

Book Description

Fast track your development skills to build powerful Odoo business applications

In Detail

Odoo is a powerful and fast-growing business application platform. Beginning with setting up the development environment, this book will then guide you through a practical journey to build feature-rich business applications.

With the aim of jumpstarting your Odoo proficiency level, from no specific knowledge to application development readiness, you will be set on the path of developing your first Odoo application. Then, you will move on to topics such as models and views and understanding and using server APIs to add business logic, which will lay a solid foundation for advanced topics.

The book concludes with a guide to Odoo interaction and how to use the Odoo API from other programs, all of which will enable you to efficiently integrate applications with other external systems.

What You Will Learn

  • Set up a development environment and manage your Odoo instances and databases
  • Develop from a remote Workstation such as Windows using Odoo
  • Create your first Odoo application and get acquainted with the development workflow
  • Build module extensions and understand the inheritance mechanisms
  • Use XML and CSV data files and external IDs to load and export data for your business applications
  • Structure the application data model using Odoo's Object Relation Mapping (ORM) capabilities
  • Design effective user interfaces using forms, lists, and kanban views
  • Integrate Odoo with other systems using the external API
  • Deploy Odoo and your business application for production use

Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

Table of Contents

  1. Odoo Development Essentials
    1. Table of Contents
    2. Odoo Development Essentials
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers, and more
        1. Why subscribe?
        2. Free access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    8. 1. Getting Started with Odoo Development
      1. Setting up a host for the Odoo server
        1. Provisions for a Debian host
        2. Creating a user account for Odoo
      2. Installing Odoo from source
      3. Initializing a new Odoo database
        1. Managing your databases
      4. A word about Odoo product versions
      5. More server configuration options
        1. Odoo server configuration files
        2. Changing the listening port
        3. Logging
      6. Developing from your workstation
        1. Using a Linux text editor
        2. Installing and configuring Samba
      7. Enabling the on-board technical tools
        1. Activating the Technical Features
        2. Activating the Developer mode
      8. Installing third-party modules
        1. Finding community modules
        2. Configuring the addons path
        3. Updating the module list
      9. Summary
    9. 2. Building Your First Odoo Application
      1. Understanding applications and modules
      2. Modifying and extending modules
      3. Creating a new module
      4. Adding to the addons path
      5. Installing the new module
      6. Upgrading a module
      7. Creating an application model
      8. Adding menu entries
      9. Creating views – form, tree, and search
        1. Creating a form view
        2. Formatting as a business document
        3. Adding action buttons
        4. Organizing forms using groups
        5. The complete form view
      10. Adding list and search views
      11. Adding business logic
      12. Setting up access control security
      13. Row-level access rules
      14. Adding an icon to the module
      15. Summary
    10. 3. Inheritance – Extending Existing Applications
      1. Adding sharing capability to the To-Do app
        1. Road map for the user sharing features
      2. Extending the to-do task model
        1. Adding fields to a model
        2. Modifying existing fields
        3. Modifying model's methods
      3. Extending views
        1. Extending tree and search views
      4. More on using inheritance to extend models
        1. Copying features using prototype inheritance
        2. Embedding models using delegation inheritance
      5. Using inheritance to add social network features
      6. Modifying data
        1. Extending the record rules
      7. Summary
    11. 4. Data Serialization and Module Data
      1. Understanding external identifiers
        1. Finding External IDs
      2. Exporting and importing data
        1. Exporting data
        2. Importing data
        3. Related records in CSV data files
      3. Module data
        1. Demonstration data
      4. XML data files
        1. The data noupdate attribute
        2. Defining Records in XML
        3. Setting field values
        4. Setting values using expressions
        5. Setting values for relation fields
        6. Shortcuts for frequently used Models
        7. Other actions in XML data files
          1. Deleting records
          2. Triggering functions and workflows
      5. Summary
    12. 5. Models – Structuring the Application Data
      1. Organizing application features into modules
      2. Introducing the todo_ui module
      3. Creating models
        1. Model attributes
        2. Models and Python classes
        3. Transient and Abstract models
        4. Inspecting existing models
      4. Creating fields
        1. Basic field types
        2. Common field attributes
        3. Reserved field names
      5. Relations between models
        1. Many to one relations
        2. Many to many relations
        3. One to many inverse relations
        4. Hierarchical relations
        5. Referencing fields using dynamic relations
      6. Computed fields
        1. Search and write on computed fields
        2. Storing computed fields
        3. Related fields
      7. Model constraints
      8. Summary
    13. 6. Views – Designing the User Interface
      1. Window actions
      2. Menu items
      3. Context and domain
        1. Session context
        2. Domain expressions
      4. Form views
        1. Business views
        2. The header status bar
          1. The business flow pipeline
          2. Title and subtitle
          3. Labels for fields
          4. Smart buttons
          5. Organizing content in a form
          6. Tabbed notebooks
      5. View elements
        1. Buttons
        2. Fields
          1. Relational fields
          2. Field widgets
          3. On-change events
        3. Dynamic views
      6. List views
      7. Search views
      8. Other types of views
        1. Calendar views
        2. Gantt views
        3. Graph views
      9. Summary
    14. 7. ORM Application Logic – Supporting Business Processes
      1. To-do wizard
        1. Wizard model
        2. Wizard form
        3. Wizard business logic
        4. Raising exceptions
        5. Auto-reloading code changes
        6. Actions on the wizard dialog
      2. Working with the server
        1. Using relation fields
        2. Querying models
        3. Writing on records
        4. Transactions and low-level SQL
        5. Working with time and dates
        6. Working with relation fields
        7. Manipulating recordsets
        8. Other recordset operations
      3. The execution environment
      4. Model methods for client interaction
        1. Overriding the default methods
        2. Model method decorators
        3. Debugging
      5. Summary
    15. 8. QWeb – Creating Kanban Views and Reports
      1. Getting started with kanban board
        1. Kanban views
      2. Design kanban views
        1. Priority and kanban state
        2. Kanban view elements
        3. The vignette kanban view
        4. Actions in kanban views
        5. The card kanban view
      3. Adding QWeb dynamic content
        1. Conditional rendering with t-if
        2. Rendering values with t-esc and t-raw
        3. Loop rendering with t-foreach
        4. Dynamic attributes with t-att- prefixes
        5. String substitution in attributes with t-attf- prefixes
        6. Setting variables with t-set
        7. Calling other templates with t-call
        8. Other QWeb directives
        9. Advanced kanban elements
        10. Adding a kanban card option menu
        11. Adding colors to kanban cards
        12. Using text ellipsis for long texts
        13. Custom CSS and JavaScript assets
      4. Creating business reports
        1. Installing wkhtmltopdf
        2. QWeb report templates
        3. Presenting data in reports
        4. Enabling language translation in reports
        5. Designing report content
        6. Paper formats
      5. Summary
    16. 9. External API – Integration with Other Systems
      1. Setting up a Python client
      2. Calling the Odoo API using XML-RPC
        1. Opening an XML-RPC connection
        2. Reading data from the server
        3. Calling other methods
      3. Writing a Notes desktop application
        1. Communication layer with Odoo
        2. Creating the GUI
      4. Introducing the ERPpeek client
        1. The ERPpeek API
        2. The ERPpeek CLI
      5. Summary
    17. 10. Deployment Checklist – Going Live
      1. Installing Odoo
        1. Installing from the source code
        2. Setting up the configuration file
        3. Setting up as a system service
      2. Using a reverse proxy
        1. Setting up nginx for reverse proxy
        2. Enforcing HTTPS
        3. Nginx optimizations
        4. Long polling
      3. Server and module updates
      4. Summary
    18. Index