10 lines
437 B
Python
10 lines
437 B
Python
from odoo import fields,models,api
|
|
class MosoProduct(models.Model):
|
|
_name = "moso.product"
|
|
_sql_constraints = [
|
|
('unique_name', 'UNIQUE(name)', 'Tên sản phẩm phải là duy nhất.'),
|
|
]
|
|
name = fields.Char(String = "Tên nội thât",unique=True,require = True)
|
|
condition_id = fields.Many2one('moso.condition',String ="Điều kiện")
|
|
type_id = fields.Many2one("moso.type",string="thể loại")
|
|
|