Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Odoo Development Cookbook
  • Table Of Contents Toc
Odoo Development Cookbook

Odoo Development Cookbook - Fifth Edition

By : Husen Daudi, Jay Vora, Parth Gajjar, Alexandre Fayolle, Holger Brunn, Daniel Reis
4.8 (6)
close
close
Odoo Development Cookbook

Odoo Development Cookbook

4.8 (6)
By: Husen Daudi, Jay Vora, Parth Gajjar, Alexandre Fayolle, Holger Brunn, Daniel Reis

Overview of this book

The latest version of the powerful Odoo framework uncovers a wide variety of features for rapid application development. Written by seasoned Odoo experts, this updated Odoo Development Cookbook will help you explore Odoo 17’s new features and use them to develop applications from scratch. You'll learn about website development concepts and get to grips with the Odoo Web Library (OWL), as well as create a new Odoo module from the ground up before progressing to advanced framework concepts. The book also shows you how to modify existing applications, including Point of Sale (POS) applications. Going beyond backend development, you'll discover advanced JavaScript recipes for creating new views and widgets. You'll get a clear understanding of website development and be on your way to becoming a proficient Odoo developer by studying performance optimization, debugging, and automated testing. By the end of this book, you'll have the knowledge you need to build impressive applications and be well-versed in Odoo development best practices.
Table of Contents (28 chapters)
close
close
17
Chapter 17: In-App Purchasing with Odoo

Using Python code server actions

Server actions have several types available, but executing arbitrary Python code is the most flexible option. When used wisely, it empowers users with the capability to implement advanced business rules from the user interface, without the need to create specific add-on modules to install that code.

We will demonstrate using this type of server action by implementing a server action that sends reminder notifications to the followers of a project task.

Getting ready

We will need an Odoo instance with the Project app installed.

How to do it...

To create a Python code server action, follow these steps:

  1. Create a new server action. In the Settings menu, select the Technical | Actions | Server Actions menu item, and click on the Create button at the top of the record list.
  2. Fill out the Server Action form with the following values:
    • Action Name: Send Reminder
    • Base Model: Task
    • Action To Do: Execute Code
  3. In the Python Code text area...
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Odoo Development Cookbook
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon