|
-
- from odoo import fields, models
-
- class Book(models.Model):
- _inherit = 'library.book'
- is_available = fields.Boolean('Is Available?')
- isbn = fields.Char(help="Use a valid ISBN-13 or ISBN-10.")
- publisher_id = fields.Many2one(index=True)
-
-
- class Member(models.Model):
- _name = 'library.member'
- _description = 'Library Member'
- card_number = fields.Char()
- partner_id = fields.Many2one(
- 'res.partner',
- delegate=True,
- ondelete='cascade',
- required=True)
|