Getting ready

In this recipe, we will add the constraints in library.book model. To do so we will use the my_library module from Chapter 4, Creating Odoo Add-On Modules.

We expect it to contain at least the following:

from odoo import models, fields
class LibraryBook(models.Model):
_name = 'library.book'
name = fields.Char('Title', required=True)
date_release = fields.Date('Release Date')
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset