11 lines
420 B
Python
11 lines
420 B
Python
from odoo import fields, models
|
|
|
|
class LibraryMember(models.Model):
|
|
_name = "library.member"
|
|
_description = "Library Member"
|
|
|
|
name = fields.Char(string="Tên thành viên")
|
|
email = fields.Char(string="Email", required=True, unique=True)
|
|
phone = fields.Char(string="Số điện thoại")
|
|
borrowed_books_ids = fields.One2many("library.book", "borrowed_by", string="Danh sách sách đã mượn")
|