You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
435 B
14 lines
435 B
from openerp import models, fields,api,http,SUPERUSER_ID
|
|
|
|
|
|
class Chairs(models.Model):
|
|
_name = 'salon.chair'
|
|
|
|
name = fields.Char()
|
|
related_employee = fields.Many2one('hr.employee', string='Related Employee')
|
|
|
|
_sql_constraints = [
|
|
('name_unique', 'unique(name)', 'This chair is already exist !'),
|
|
('related_employee_unique', 'unique(related_employee)', 'This person was reserved for another chair !')]
|
|
|
|
|
|
|