万本电子书0元读

万本电子书0元读

顶部广告

Odoo 12 Development Essentials电子书

售       价:¥

12人正在读 | 0人评论 9.8

作       者:Daniel Reis

出  版  社:Packt Publishing

出版时间:2018-12-28

字       数:53.0万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Extend your skills with Odoo 12 to build resourceful and open source business applications Key Features *Explore Odoo 12 capabilities to develop business applications *Program business logic and manipulate data to implement specific business rules in your applications *Integrate Python APIs for building customizable and scalable business logic Book Description Odoo is one of the best platforms for open source ERP and CRM. Its latest version, Odoo 12, brings with it new features and updates in Python packages to develop more customizable applications with additional cloud capabilities. The book begins by covering the development essentials for building business applications. You will start your journey by learning how to install and configure Odoo, and then transition from having no specific knowledge of Odoo to being ready for application development. You will develop your first Odoo application and understand topics such as models and views. Odoo 12 Development Essentials will also guide you in using server APIs to add business logic, helping you lay a solid foundation for advanced topics. As you progress through the chapters, you will be equipped to build and customize your applications and explore the new features in Odoo 12, such as cloud integration, to scale your business applications. You will get insights into building business logic and integrating various APIs into your application. By the end of the book, you will be able to build a business application from scratch by using the latest version of Odoo. What you will learn *Manage Odoo server instances *Create a new Odoo application from scratch using the most frequently used elements *Develop new models and use inheritance to extend existing models *Use ORM methods in the Odoo server and from external clients *Create Kanban views using QWeb effectively *Build custom web and website CMS pages *Use external APIs to integrate Odoo with external applications *Add automated tests and techniques to debug module business logic Who this book is for If you are a developer familiar with Python and MVC design and want to build business applications using Odoo, this book is for you.
目录展开

Title Page

Copyright and Credits

Odoo 12 Development Essentials Fourth Edition

Packt Upsell

Why subscribe?

Packt.com

Foreword

Contributors

About the author

About the reviewer

Packt is searching for authors like you

Preface

Who this book is for

What this book covers

To get the most out of this book

Download the example code files

Download the color images

Conventions used

Get in touch

Reviews

Quick Start Using the Developer Mode

Technical requirements

Introducing the to-do list project

Basic concepts

The Odoo architecture

Odoo community versus Odoo enterprise

Odoo version policy

Preparing a basic work environment

Using an Odoo SaaS trial database

Installing Odoo on Windows

Installing Odoo using Docker containers

Other installation options

Creating a work database

Enabling the developer mode

Modifying an existing model to add a field

Adding a field to a Model

Adding a field to a form view

Creating a new Model

Configuring access control security

Security groups

Security access control lists

Security record rules

The superuser account

Creating menu items

Creating views

List views

Form views

Search views

Summary

Questions

Preparing the Development Environment

Technical requirements

Setting up a host for the Odoo server

Installing the Windows Subsystem for Linux

Installing a Linux server

Installing Odoo from source

Installing the PostgreSQL database

Installing Odoo system dependencies

Installing Odoo from source

Initializing a new Odoo database

Managing Odoo databases

More server configuration options

Odoo server configuration files

Changing the listening port

Database selection options

Managing server log messages

Installing additional modules

Finding community modules

Configuring the add-ons path

Installing Odoo in a Python virtual environment

Downloading and installing add-on modules from PyPI

The server development mode

Summary

Your First Odoo Application

Technical requirements

Overview of the library project

Creating a new addon module

Preparing the addons path

Creating the module directory and manifest

Adding an icon

Choosing a license

Installing a new module

Upgrading modules

Creating a new application

Adding the app's top menu item

Adding security groups

Adding automated tests

Testing business logic

Testing access security

The model layer

Creating the data model

Setting up access security

Adding access control security

Row-level access rules

The view layer

Adding menu items

Creating the form view

Business document form views

Adding action buttons

Using groups to organize forms

The complete form view

Adding list and search views

The business logic layer

Adding business logic

Web pages and controllers

Summary

Questions

Further Reading

Extending Modules

Technical requirements

Learning project – extending the Library app

In-place Model extension

Adding fields to a Model

Modifying existing fields

Modifying Views and data

Extending Views

Selecting extension points with XPath

Modifying data

More Model inheritance mechanisms

Copying features with prototype inheritance

Embedding Models using delegation inheritance

Extending Models using mixin classes

Extending Python methods

Extending web controllers and templates

Extending Web Controllers

Extending QWeb Templates

Summary

Questions

Further reading

Import, Export, and Module Data

Technical requirements

Understanding the external identifier concept

How external identifiers work

Finding external identifiers

Exporting and importing CSV data files

Exporting data

Importing data

Related records in CSV data files

Adding module data

Demonstration data

Using XML data files

The noupdate data attribute

Defining records in XML

Setting field values directly

Setting values using expressions

Setting values on many-to-one relation fields

Setting values on to-many relation fields

Shortcuts for frequently used models

Other actions in XML data files

Deleting records

Calling model methods

Summary

Questions

Further reading

Models – Structuring the Application Data

Technical requirements

Learning project – improving the Library app

Creating models

Model attributes

Models and Python classes

Transient and abstract models

Inspecting existing models

Creating fields

Basic field types

Common field attributes

Special field names

Relationships between models

Many-to-one relationships

One-to-many inverse relationships

Many-to-many relationships

Hierarchical relationships

Flexible relationships using Reference fields

Computed fields

Searching and writing to computed fields

Storing computed fields

Related fields

Model constraints

SQL model constraints

Python model constraints

About the Odoo base Models

Summary

Recordsets – Working with Model Data

Technical requirements

Using the shell command

The execution environment

Environment attributes

The environment context

Modifying the recordset execution environment

Querying data with recordsets and domains

Creating recordsets

Domain expressions

Accessing data on recordsets

Accessing data on records

Accessing relational fields

Accessing date and time values

Converting text-represented dates and times

Writing on records

Writing with object-style value assignment

Writing with the write() method

Writing date and time values

Creating and deleting records

Composing recordsets

Low-level SQL and database transactions

Summary

Business Logic – Supporting Business Processes

Technical requirements

Learning project – the library_checkout module

Using stages for document-centered workflows

The ORM method decorators

Methods for recordsets – @api.multi

Methods for singleton records – @api.one

Class static methods – @api.model

On change methods

Other model method decorators

Using the ORM built-in methods

Methods for writing model data

Methods for data import and export

Methods to support the user interface

The message and activity features

Message subtypes

Posting messages

Adding followers

Creating a wizard

The wizard model

The wizard form

The wizard business logic

Using log messages

Raising exceptions

Unit tests

Adding unit tests

Running tests

Setting up tests

Writing test cases

Testing exceptions

Development tools

Server development options

Debugging

The Python debugger

A sample debugging session

Alternative Python debuggers

Printing messages and logging

Inspecting and killing running processes

Summary

Further reading

External API – Integrating with Other Systems

Technical requirements

Learning project – a client to catalogue books

Setting up Python on the client machine

Connecting to Odoo API using XML-RPC

Running server methods using XML-RPC

Search and read API methods

The Library client XML-RPC interface

The Library client user interface

Using the OdooRPC library

About the ERPpeek client

Summary

Further reading

Backend Views – Designing the User Interface

Technical requirements

Menu items

Window Actions

Form view structure

Business document views

The header

Header buttons

The stage pipeline

Using states instead of stages

The document sheet

Title and subtitle

Grouping the form content

Tabbed notebooks

Fields

Labels for fields

Field widgets

Relational fields

Buttons

Smart buttons

Dynamic view elements

On-change events

Dynamic attributes

List views

Search views

Other view types

Activity views

Calendar views

Pivot views

Graph views

Summary

Further reading

Kanban Views and Client-Side QWeb

Technical requirements

About Kanban boards

Kanban views

Designing Kanban views

Priority, Kanban state, and color

Kanban card elements

The Kanban card layout

Adding a Kanban card option menu

Actions in Kanban views

The QWeb template language

The QWeb JavaScript evaluation context

Dynamic attributes by string substitution – t-attf

Dynamic attributes by expressions – t-att

Loops – t-foreach

Conditionals – t-if

Rendering values – t-esc and t-raw

Set values on variables – t-set

Call and reuse other templates – t-call

Dynamic attributes using dictionaries and lists

Inheritance on Kanban views

Custom CSS and JavaScript assets

Summary

Further reading

Reports and Server-Side QWeb

Technical requirements

Installing wkhtmltopdf

Creating business reports

QWeb report templates

Presenting data in reports

Rendering images

Report totals

Defining paper formats

Enabling language translation in reports

Reports based on custom SQL

Summary

Further reading

Creating Website Frontend Features

Technical requirements

Learning project – the Library self-service

Our first web page

Hello World using a QWeb template

HelloCMS!

Building websites

Adding CSS and JavaScript assets

The checkout-list controller

The checkout QWeb template

The checkout detail page

Summary

Further reading

Deploying and Maintaining Production Instances

Technical requirements

Installing Odoo from source code

Installing dependencies

Preparing a dedicated system user

Installing from the source code

Setting up the configuration file

Multiprocessing workers

Setting up Odoo as a system service

Creating a systemd service

Creating an Upstart or sysvinit service

Checking the Odoo service from the command line

Setting up an nginx reverse proxy

Configuring and enforcing HTTPS

Creating a self-signed SSL certificate

Configuring HTTPS access on nginx

Caching static content

Server and module updates

Creating a staging environment

Updating Odoo source code

Summary

Further reading

Assessments

Chapter 1

Chapter 3

Chapter 4

Chapter 5

Other Books You May Enjoy

Leave a review - let other readers know what you think

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部