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 the Python debugger to trace method execution

Sometimes, application logs are not enough to figure out what is going wrong. Fortunately, we also have the Python debugger. This recipe shows us how to insert a breakpoint in a method and trace the execution by hand.

Getting ready

We will reuse the export_stock_level() method that was shown in the Using the Odoo shell to interactively call methods recipe of this chapter. Ensure that you have a copy to hand.

How to do it...

To trace the execution of export_stock_level() with pdb, perform the following steps:

  1. Edit the code of the method, and insert the line highlighted here:
    def export_stock_level(self, stock_location):
        import pdb; pdb.set_trace()
        products = self.with_context( location=stock_location.id ).search([])
        fname = join(EXPORTS_DIR, 'stock_level.txt')
        try:
           &...
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