ENGLISH

Odoo 12 development cookbook : over 190+ unique recipes to build effective enterprise and business applications

Book information

Publisher
Packt Publishing
Year
2019
ISBN
9781789618921, 1789618924
Language
english
Format
PDF
Filesize
14 MB (14241444 bytes)
Edition
3 ed.
Pages
740\761
Time added
2020-04-26 10:25:31

Description

Cover Title Page Copyright and Credits About Packt Contributors Table of Contents Preface Chapter 1: Installing the Odoo Development Environment Introduction Odoo ecosystem Odoo editions Git repositories Runbot Odoo app store Odoo community association Official Odoo help forum Easy installation of Odoo from a source Getting ready How to do it... How it works... Virtual environments PostgreSQL configuration Git configuration Downloading the Odoo source code Starting the instance Managing Odoo environments using the start command Getting ready How to do it... How it works... There's more… Managing Odoo server databases Getting ready How to do it... Accessing the database management interface Setting or changing the master password Creating a new database Duplicating a database Removing a database Backing up a database Restoring a database backup How it works... There's more... Storing the instance configuration in a file How to do it... How it works... Activating the Odoo developer tools How to do it... How it works... Updating Odoo from source Getting ready How to do it... How it works... Chapter 2: Managing Odoo Server Instances Introduction Configuring the add-ons path Getting ready How to do it… How it works… There's more… Updating the add-on modules list Getting ready How to do it… How it works… Standardizing your instance directory layout How to do it… How it works… See also There's more... Installing and upgrading local add-on modules Getting ready How to do it… From the web interface From the command line How it works… Add-on installation Add-on update 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: Server Deployment Introduction Installing Odoo for production use Getting ready How to do it... How it works... There's more... Server dimensioning PostgreSQL tuning Source code version Backups Adapting the configuration file for production Getting ready How to do it... How it works... There's more... Setting up Odoo as a system service Getting ready How to do it... How it works... Configuring a reverse proxy and SSL with nginx and Let's Encrypt Getting ready How to do it... How it works... There's more... See also Using Docker to run Odoo Getting ready How to do it… How it works… Running the Odoo image with a configuration file Running the Odoo image with custom add-ons Running multiple Odoo instances There is more... Running Odoo through docker-compose Getting ready How to do it... How it works... There's more... Managing content delivery networks for websites Getting ready How to do it... Configuring the CDN provider Configuring CDN at Odoo How it works... There's more... Chapter 4: Creating Odoo Add-On Modules Technical requirements Introduction 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... Accessing Odoo as a superuser 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 5: Application Models Introduction 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... 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... There's more... Using abstract models for reusable model features 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... Chapter 6: Basic Server-Side Development Introduction Technical requirements Defining model methods and using the API decorators Getting ready How to do it... How it works... There's more... 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 with read_group() Getting ready How to do it... How it works... Chapter 7: Module Data Introduction 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 8: Debugging Introduction 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 Using the Odoo Community Association maintainer quality tools Getting ready How to do it... How it works... There's more... Using Pylint to check your code Using Flake8 to check your code Understanding the debug mode options How to do it... How it works... Chapter 9: Advanced Server-Side Development Techniques Introduction 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... Using the context to compute default values Wizards and code reuse Redirecting the user 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... There's more... See also Defining a model based on an SQL view Getting ready How to do it... How it works... There's more... 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 10: Backend Views Introduction Technical requirements Adding a menu item and window action 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... ir.actions.act_window.view There's more... Adding content and widgets to a form view How to do it... How it works... Form Header Button Group Field Notebook and page General attributes Other tags 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... Operators Pitfalls of searching using domains 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 Changing existing views – view inheritance How to do it... How it works... There's more... Order of evaluation in view inheritance See also Defining document-style forms How to do it... How it works... 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... Showing kanban cards in columns according to their state Getting ready How to do it... How it works... There's more... Defining calendar and gantt views How to do it... How it works... There's more... Gantt View Defining graph and pivot views 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.... Chapter 11: Access Security Technical requirements Creating security groups and assigning them to users Getting ready How to do it... How it works... There's more... Adding security access to models Getting ready How to do it... How it works... There's more... Limiting access to fields in models How to do it... How it works... There's more... Limiting record access using record rules 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... Chapter 12:Internationalization Installing a language and configuring user preferences Getting ready 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... Chapter 13: Automation, Workflows, and Printouts Introduction Technical requirements Managing dynamic record stages Getting ready How to do it... How it works... There's more... Managing kanban stages Getting started How to do it... How it works... There's more... Adding a quick create form in 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... Using automated actions on time conditions Getting ready How to do it... How it works... There's 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... Chapter 14: Web Server Development Introduction Technical requirements Making a path accessible from the network Getting ready How to do it... How it works... odoo.http.route Return values odoo.http.request 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 Chapter 15: CMS Website Development Introduction Managing static assets What are asset bundles and different assets in Odoo? Custom assets How to do it... How it works... There's more... Extending CSS and JavaScript for the website Getting ready How to do it... How it works... Creating or modifying templates – QWeb Getting ready How to do it... How it works... Loops Dynamic attributes Fields Conditionals Setting variables Subtemplates Inline editing There's more... See also Managing dynamic routes Getting ready How to do it... How it works... There's more... Offering snippets to the user Getting ready How to do it... How it works... There's more... Getting input from users Getting ready How to do it... How it works... There's more... Managing Search Engine Optimization (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... 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... Chapter 16: Web Client Development Introduction 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 tour Getting ready How to do it... How it works... Mobile app JavaScript Getting ready How to do it... How to works... There's more... Chapter 17: In-App Purchasing with Odoo Introduction Technical requirements In-app purchase 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 Introduction Technical requirements 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... 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... Running QUnit test cases Running tours from the UI 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... Chapter 19: Managing, Deploying, and Testing with Odoo.sh Introduction 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... Creating the production branch Creating a development branch Creating a staging branch Merging new features in the production branch How it works... Accessing debugging options How to do it... Branch history Mail catcher Web shell Code editor Logs 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... Project name Collaborators Public access Module installation Submodules Database workers Staging branches There's more... Database size Odoo source code revisions Chapter 20: Remote Procedure Calls in Odoo Technical requirements Logging in/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/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... Create/update/delete 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 Chapter 21: Performance Optimization The prefetching pattern for the recordsets How to do it... How it works... There's more... The in-memory cache – ormcache How to do it... ormcache ormcache_context ormcache_multi How it works... There's more... Generating image thumbnails How to do it... How it works... There's more... Accessing grouped data How to do it... How it works... There's more... 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 Introduction 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... Modifying the POS 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... There's more... Chapter 23: Manage Emails in Odoo Technical requirements Configuring incoming and outgoing mail servers Getting ready How to do it... Configuring the incoming mail server Configuring the outgoing mail server How it works... There's more... Managing chatter on documents Getting ready How to do it... How it works... There is more... Managing activities on documents Getting ready How to do it... How it works... There's more... Sending mail using the Jinja template Getting ready How to do it... How it works... There's more... Sending mail using the QWeb template Getting ready How to do it... How it works... There's more... Managing the mail alias Getting ready How to do it... How it works... There's more... Logging user changes in chatter Getting ready How to do it... How it works... Chapter 24: 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 the network Getting ready How to do it... How it works... Adding the IoT Box to Odoo Getting ready How to do it... Connecting the IoT Box automatically Connecting the IoT Box manually 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 is 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... Other Book You May Enjoy Index

Similar books

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

Idries Shah 27 Books Collection : A Perfumed Scorpion, A Veiled Gazelle, Caravan of Dreams, Darkest England, Destination Mecca, Evenings with Idries Shah, Knowing How to Know, Learning How to Learn, Letters and Lectures of Idries Shah, Neglected aspects of Sufi study, Observations, Oriental Magic, Reflections, Seeker after Truth, Special Illumination, Special Problems in the study of Sufi ideas, Sufi thought and action, Tales of the Dervishes, The Dermis Probe, The Elephant in the Dark, The Englishman Handbook, Idries Shah Antology, The Magic Monastery, The natives are restless, wisdom of the Idiots PDF.

2022 · PDF

The travels of Capts. Lewis and Clarke from St. Louis, by way of the Missouri and Columbia rivers, to the Pacific ocean; performed in the years 1804, 1805 & 1806, by order of the government of the United States. Containing delineations of the manners, customs, religion, &c. of the Indians, comp. from various authentic sources, and original documents, and a summary of the Statistical view of the Indian nations, from the official communication of Meriwether Lewis. Illustrated with a map of the country, inhabited by the western tribes of Indians

1809 · PDF

Professional Linux kernel architecture ''Wrox programmer to programmer''--Cover. - ''What you are reading right now is the result of an evolution over more than seven years: After two years of writing, the first edition was published in German by Carl Hanser Verlag in 2003. It then described kernel 2.6.0. The test was used as a basis for the low-level design documentation for the EAL4+ security evaluation of Red Hat Enterprise Linux 5, requiring to update it to kernel 2.6.18 (if the EAL acronym does not mean anything to you, then Wikipedia is once more your friend). Hewlett-Packard sponsored the translation into English and has, thankfully, granted the rights to publish the result. Updates to kernel 2.6.24 were then performed specifically for this book''--P. ix

2008 · PDF