Follow these steps to generate a basic service module:
- Create a new iap_isbn_service module and add __init__.py:
from . import modelsfrom . import controllers
- Add __manifest__.py, with the following content:
{ 'name': "IAP ISBN service", 'summary': "Get books information by ISBN number", 'website': "http://www.example.com", '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', ]}
- Add a book.info model at models/book_info.py, with a method to fetch the book data:
from odoo import models, fields, apiclass BookInfo(models.Model): _name = 'book.info' name = fields.Char('Books Name', required=True) ...