售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
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
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜