-
Notifications
You must be signed in to change notification settings - Fork 0
/
model_type.py
29 lines (26 loc) · 842 Bytes
/
model_type.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
'''
The Inspection Result Types module:
what are the valid values for the inspection point result.
@author: Tzanko
'''
from openerp import models, fields, api
import random
import logging
from openerp.osv.fields import related
_logger = logging.getLogger(__name__)
class MyClass(models.Model):
'''
Inspection Point Result Type
'''
_name = "inspection_tech.inspection_result.type"
name = fields.Char(required = True,
size = 64,
string = "Inspection Result",
index = True,
help = "Inspection Result Value",
select = True)
orderno = fields.Integer("Order")
_order = 'orderno, id'
_sql_constraints = [
('name_uniq', 'unique(name)', 'Inspection Result type must be unique!'),
]