Odoo 14 Development Cookbook -
Book information
Description
Cover Title page Copyright and Credits About Packt Contributors and Table of Contents Preface Chapter 1: Installing the Odoo Development Environment Understanding the Odoo ecosystem Odoo editions Git repositories Runbot Odoo app store Odoo Community Association Official Odoo help forum Odoo's eLearning platform Easy installation of Odoo from source Getting ready How to do it... How it works... Managing Odoo server databases Getting ready How to do it... How it works... There's more... Storing the instance configuration in a file How to do it... How it works... Activating Odoo developer tools How to do it... How it works... Updating the add-on modules list Getting ready How to do it… How it works… Chapter 2: Managing Odoo Server Instances Configuring the add-ons path Getting ready How to do it… How it works… There's more… Standardizing your instance directory layout How to do it… How it works… There's more... Installing and upgrading local add-on modules Getting ready How to do it… How it works… There's more… Installing add-on modules from GitHub Getting ready How to do it… How it works… There's more… Applying changes to add-ons Getting ready How to do it… How it works… See also Applying and trying proposed pull requests Getting ready How to do it… How it works… There's more… Chapter 3: Creating Odoo Add-On Modules Technical requirements What is an Odoo add-on module? Creating and installing a new add-on module Getting ready How to do it... How it works... Completing the add-on module manifest Getting ready How to do it... How it works... There's more… Organizing the add-on module file structure Getting ready How to do it... How it works... Adding models Getting ready How to do it... How it works... Adding menu items and views Getting ready How to do it... How it works... Adding access security Getting ready How to do it... How it works… See also Using the scaffold command to create a module Getting ready How to do it... How it works... Chapter 4: Application Models Technical requirements Defining the model representation and order Getting ready How to do it... How it works... There's more... Adding data fields to a model Getting ready How to do it... How it works... There's more... Using a float field with configurable precision Getting ready How to do it... How it works... Adding a monetary field to a model Getting ready How to do it... How it works... Adding relational fields to a model Getting ready How to do it... How it works... There's more... Adding a hierarchy to a model Getting ready How to do it... How it works... There's more... Adding constraint validations to a model Getting ready How to do it... How it works... There's more... Adding computed fields to a model Getting ready How to do it... How it works... There's more... Exposing related fields stored in other models Getting ready How to do it... How it works... There's more... Adding dynamic relations using reference fields Getting ready How to do it... How it works... Adding features to a model using inheritance Getting ready How to do it... How it works... Copy model definition using inheritance Getting ready How to do it... How it works... There's more… Using delegation inheritance to copy features to another model Getting ready How to do it... How it works... There's more... Using abstract models for reusable model features Getting ready How to do it... How it works... There's more... Chapter 5: Basic Server-Side Development Technical requirements Defining model methods and using API decorators Getting ready How to do it... How it works... Reporting errors to the user Getting ready How to do it... How it works... There's more... Obtaining an empty recordset for a different model Getting ready How to do it... How it works... See also Creating new records Getting ready How to do it... How it works... There's more… Updating values of recordset records Getting ready How to do it... How it works... There's more... Searching for records Getting ready How to do it... How it works... There's more... Combining recordsets Getting ready How to do it... How it works... Filtering recordsets Getting ready How to do it... How it works... There's more... Traversing recordset relations Getting ready How to do it... How it works... There's more... See also Sorting recordsets Getting ready How to do it... How it works... There's more... Extending the business logic defined in a model Getting ready How to do it... How it works... There's more... Extending write() and create() Getting ready How to do it... How it works... There's more... Customizing how records are searched Getting ready How to do it... How it works... There's more... See also Fetching data in groups using read_group() Getting ready How to do it... How it works... Chapter 6: Managing Module Data Technical requirements Using external IDs and namespaces How to do it... How it works... There's more... See also Loading data using XML files How to do it... How it works... There's more... Using the noupdate and forcecreate flags How to do it... How it works... There's more... See also Loading data using CSV files How to do it... How it works... There's more... Add-on updates and data migration How to do it... How it works... There's more... See also Deleting records from XML files Getting ready How to do it... How it works... Invoking functions from XML files How to do it... How it works... There's more... Chapter 7: Debugging Modules The auto-reload and --dev options Getting ready How to do it... How it works... Producing server logs to help debug methods Getting ready How to do it... How it works... There's more... Using the Odoo shell to interactively call methods Getting ready How to do it... How it works... There's more... Using the Python debugger to trace method execution Getting ready How to do it... How it works... There's more... See also Understanding the debug mode options How to do it... How it works... Chapter 8: Advanced Server-Side Development Techniques Technical requirements Changing the user that performs an action Getting ready How to do it... How it works... There's more... See also Calling a method with a modified context Getting ready How to do it... How it works... There's more... See also Executing raw SQL queries Getting ready How to do it... How it works... There's more... See also Writing a wizard to guide the user Getting ready How to do it... How it works... There's more... See also Defining onchange methods Getting ready How to do it... How it works... There's more... Calling onchange methods on the server side Getting ready How to do it... How it works... See also Defining onchange with the compute method Getting ready How to do it... How it works... There's more... See also Defining a model based on a SQL view Getting ready How to do it... How it works... There's more... See also Adding custom settings options Getting ready How to do it... How it works... There's more... Implementing init hooks Getting ready How to do it... How it works... Chapter 9: Backend Views Technical requirements Adding a menu item and window actions Getting ready How to do it... How it works... There's more... See also Having an action open a specific view How to do it... How it works... There's more... Adding content and widgets to a form view How to do it... How it works... There's more... See also Adding buttons to forms How to do it... How it works... There's more... Passing parameters to forms and actions – context Getting ready How to do it... How it works... There's more... See also Defining filters on record lists – domain How to do it... How it works... There's more... See also Defining list views How to do it... How it works... There's more... Defining search views How to do it... How it works... There's more... See also Adding a search filter side panel Getting ready How to do it... How it works... There's more... Changing existing views – view inheritance How to do it... How it works... There's more... Defining document-style forms How to do it... How it works... See also Dynamic form elements using attrs How to do it... How it works... There's more... Defining embedded views How to do it... How it works... There's more... Displaying attachments on the side of the form view How to do it... How it works... There's more... Defining kanban views How to do it... How it works... There's more... See also Showing kanban cards in columns according to their state Getting ready How to do it... How it works... There's more... Defining calendar views How to do it... How it works... There's more... Defining graph view and pivot view Getting ready How to do it... How it works... There's more... Defining the cohort view Getting ready How to do it... How it works... Defining the dashboard view Getting ready How to do it... How it works... There's more.... Defining the gantt view Getting ready How to do it... How it works... There's more... Defining the activity view Getting ready How to do it... How it works... Defining the map view Getting ready How to do it… How it works... Chapter 10: Security Access Technical requirements Creating security groups and assigning them to users Getting ready How to do it... How it works... There's more... See also Adding security access to models Getting ready How to do it... How it works... There's more... See also Limiting access to fields in models Getting ready How to do it... How it works... There's more... See also Limiting record access using record rules Getting ready How to do it... How it works... There's more... Using security groups to activate features Getting ready How to do it... How it works... There's more... Accessing recordsets as a superuser How to do it... How it works... There's more... Hiding view elements and menus based on groups Getting ready How to do it... How it works... See also Chapter 11: Internationalization Installing a language and configuring user preferences How to do it... How it works... There's more... Configuring language-related settings Getting ready How to do it... How it works... There's more... Translating texts through the web client user interface Getting ready How to do it... How it works... There's more... Exporting translation strings to a file Getting ready How to do it... How it works... There's more... Using gettext tools to make translations easier How to do it... How it works... There's more... Importing translation files into Odoo Getting ready How to do it... How it works... Changing the custom language URL code for a website Getting ready How to do it... How it works... Chapter 12: Automation, Workflows, Emails, and Printing Technical requirements Managing dynamic record stages Getting ready How to do it... How it works... There's more... See more Managing kanban stages Getting started How to do it... How it works... There's more... See more Adding a quick create form to a kanban card Getting started How to do it... How it works... Creating interactive kanban cards Getting started How to do it... How it works... Adding a progress bar in kanban views Getting started How to do it... How it works... Creating server actions Getting ready How to do it... How it works... There's more... Using Python code server actions Getting ready How to do it... How it works... There's more... See more Using automated actions on time conditions Getting ready How to do it... How it works... There's more... See more Using automated actions on event conditions Getting ready How to do it... How it works... There's more... Creating QWeb-based PDF reports Getting ready How to do it... How it works... There's more... Managing activities from a kanban card Getting started How to do it... How it works... There's more… See also Adding a stat button to a form view Getting started How to do it... How it works... See also Enabling the archive option for records Getting started How to do it... How it works... There's more… Chapter 13: Web Server Development Technical requirements Making a path accessible from the network Getting ready How to do it... How it works... There's more... See also Restricting access to web-accessible paths Getting ready How to do it... How it works... There's more... Consuming parameters passed to your handlers How to do it... How it works... There's more... See also Modifying an existing handler Getting ready How to do it... How it works… There's more... See also Serving static resources Getting ready How to do it... How it works… Chapter 14: CMS Website Development Managing static assets What are asset bundles and different assets in Odoo? Custom assets How to do it... How it works... There’s more... Adding CSS and JavaScript for a website Getting ready How to do it... How it works... There’s more... Creating or modifying templates – QWeb Getting ready How to do it... How it works... There’s more... See also Managing dynamic routes Getting ready How to do it... How it works... There’s more... Offering static snippets to the user Getting ready How to do it... How it works... There’s more... Offering dynamic snippets to the user Getting ready How to do it... How it works... There’s more... Getting input from website users Getting ready How to do it... How it works... There’s more... Managing SEO options Getting ready How to do it... How it works... There’s more... Managing sitemaps for the website Getting ready... How to do it... How it works... There’s more... Getting a visitor’s country information Getting ready How to do it... How it works... Tracking a marketing campaign Getting ready How to do it... How it works... Managing multiple websites Getting ready How to do it... How it works... Redirecting old URLs Getting ready How to do it... How it works... Publish management for website-related records Getting ready How to do it… How it works... There’s more… Chapter 15: Web Client Development Technical requirements Creating custom widgets Getting ready How to do it... How it works... There’s more... Using client-side QWeb templates Getting ready How to do it... How it works... There’s more... See also Making RPC calls to the server Getting ready How to do it... How it works... There’s more... See also Creating a new view Getting ready How to do it... How it works... There’s more... Debugging your client-side code Getting ready How to do it... How it works... There’s more... Improving onboarding with tours Getting ready How to do it... How it works... Mobile app JavaScript Getting ready How to do it... How it works... There’s more... Chapter 16: The Odoo Web Library (OWL) Technical requirements Creating an OWL component Getting ready How to do it... How it works... There's more... Managing user actions in an OWL component Getting ready How to do it... How it works... There's more... Making OWL components reactive Getting ready How to do it... How it works... Understanding the OWL component life cycle Getting ready How to do it... How it works... There's more... Adding an OWL field to the form view Getting ready How to do it... How it works... Chapter 17: In-App Purchasing with Odoo Technical requirements IAP concepts How it works... The IAP service flow There's more... Registering an IAP service in Odoo Getting ready How to do it... How it works... Creating an IAP service module Getting ready How to do it... How it works... Authorizing and charging IAP credits Getting ready How to do it... How it works... There's more... See also Creating an IAP client module Getting ready How to do it... How it works... There's more... Displaying offers when an account lacks credits Getting ready How to do it... How it works... There's more... Chapter 18: Automated Test Cases Technical requirements Adding Python test cases Getting ready How to do it... How it works... There's more... Running tagged Python test cases Getting ready How to do it... How it works... There's more... Setting up Headless Chrome for client-side test cases How to do it... How it works... Adding client-side QUnit test cases Getting ready How to do it... How it works... There's more... Adding tour test cases Getting ready How to do it... How it works... Running client-side test cases from the UI How to do it... How it works... Debugging client-side test cases Getting ready How to do it... How it works... Generating videos/screenshots for failed test cases How to do it... How it works... Populating random data for testing Getting ready How to do it... How it works... There's more… Chapter 19: Managing, Deploying, and Testing with Odoo.sh Technical requirements Exploring some basic concepts of Odoo.sh What is Odoo.sh? Why was Odoo.sh introduced? When should you use Odoo.sh? What are the features of Odoo.sh? Creating an Odoo.sh account Getting ready How to do it... How it works... There's more... Adding and installing custom modules Getting ready How to do it... How it works... There's more... Managing branches Getting ready How to do it... How it works... Accessing debugging options How to do it... There's more... Getting a backup of your instance How to do it... How it works... Checking the status of your builds How to do it... How it works... There's more... All Odoo.sh options Getting ready How to do it... There's more... Chapter 20: Remote Procedure Calls in Odoo Technical requirements Logging in to/connecting Odoo with XML-RPC Getting ready How to do it... How it works... There's more... Searching/reading records through XML-RPC Getting ready How to do it... How it works... There's more... Creating/updating/deleting records through XML-RPC Getting ready How to do it... How it works... There's more... Calling methods through XML-RPC Getting ready How to do it... How it works... There's more... Logging in to/connecting Odoo with JSON-RPC Getting ready How to do it... How it works... There's more... Fetching/searching records through JSON-RPC Getting ready How to do it... How it works... There's more... Creating/updating/deleting records through JSON-RPC Getting ready How to do it... How it works... There's more... Calling methods through JSON-RPC Getting ready How to do it... How it works... The OCA odoorpc library Getting ready How to do it... How it works... There's more... See also Generating API keys How to do it... How it works... Chapter 21: Performance Optimization The prefetching pattern for recordsets How to do it… How it works... There's more... The in-memory cache – ormcache How to do it... How it works... There's more... Generating differently sized images How to do it... How it works... There's more... Accessing grouped data How to do it... How it works... There's more... See also Creating or writing multiple records How to do it... How it works... There's more... Accessing records through database queries How to do it... How it works... There's more... Profiling Python code How to do it... How it works... There's more... Chapter 22: Point of Sale Technical requirements Adding custom JavaScript/SCSS files Getting ready How to do it... How it works... There's more... Adding an action button on the keyboard Getting ready How to do it... How it works... There's more... Making RPC calls Getting ready How to do it... How it works... There's more... Modifying the Point of Sale screen UI Getting ready How to do it... How it works... Modifying existing business logic Getting ready How to do it... How it works... Modifying customer receipts Getting ready How to do it... How it works... Chapter 23: Managing Emails in Odoo Technical requirements Configuring incoming and outgoing email servers Getting ready How to do it... How it works... There's more... Managing chatter on documents Getting ready How to do it... How it works... There's more... Managing activities on documents Getting ready How to do it... How it works... There's more... Sending emails using the Jinja template Getting ready How to do it... How it works... There's more... Sending emails using the QWeb template Getting ready How to do it... How it works... There's more... Managing the email alias Getting ready How to do it... How it works... There's more... Logging user changes in a chatter Getting ready How to do it... How it works... Sending periodic digest emails Getting ready How to do it... How it works... Chapter 24: Managing the IoT Box Technical requirements Flashing the IoT Box image for Raspberry Pi Getting ready How to do it... How it works... There's more... Connecting the IoT Box with a network Getting ready How to do it... How it works... Adding the IoT Box to Odoo Getting ready How to do it... How it works... There's more... Loading drivers and listing connected devices Getting ready How to do it... How it works... Taking input from devices Getting ready How to do it... How it works... There's more... Accessing the IoT Box through SSH Getting ready How it works... How to do it... There's more... Configuring a point of sale Getting ready How to do it... How it works... There's more... Sending PDF reports directly to a printer Getting ready How to do it... How it works... Other Books You May Enjoy Index
Similar books
Odoo 14 Development Cookbook: Rapidly build, customize, and manage secure and efficient business apps using Odoo's latest features, 4th Edition
EPUB
Odoo 11 Development Cookbook - Second Edition: Over 120 unique recipes to build effective enterprise and business applications
2018 · EPUB
Odoo Development Cookbook
2016 · PDF
MySQL® Notes for Professionals book
2018 · PDF
MrExcel 2022: Boosting Excel
2022 · PDF
MrExcel 2022: Boosting Excel
2022 · PDF
Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36
2010 · PDF
THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.
1858 · PDF