How to do it...

Follow these steps to generate a basic service module:

  1. Create a new iap_isbn_service module and add
from . import modelsfrom . import controllers
  1. Add, with the following content:
{    'name': "IAP ISBN service",    'summary': "Get books information by ISBN number",    'website': "",    'category': 'Uncategorized',    'version': '12.0.1',    'depends': ['iap', 'web', 'base_setup'],    'data': [        'security/ir.model.access.csv',        'views/book_info_views.xml',        'data/books_data.xml',    ]}
  1. Add a model at models/, with a method to fetch the book data:
from odoo import models, fields, apiclass BookInfo(models.Model):    _name = '' name = fields.Char('Books Name', required=True) ...

Get Odoo 12 Development Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.