16 lines
499 B
Python
16 lines
499 B
Python
from odoo import models, fields, api
|
|
|
|
class ClinicMedicine(models.Model):
|
|
_name = 'clinic.medicine'
|
|
_description = 'Thuốc'
|
|
|
|
name = fields.Char(string='Tên thuốc', required=True)
|
|
category = fields.Selection([
|
|
('antibiotics', 'Kháng sinh'),
|
|
('painkiller', 'Giảm đau'),
|
|
('vitamins', 'Vitamins'),
|
|
('others', 'Khác')
|
|
], string='Phân loại thuốc')
|
|
price = fields.Float(string='Giá')
|
|
stock = fields.Integer(string='Số lượng')
|