1
# -*- coding: utf-8 -*-
2
##############################################################################
4
# This program is free software: you can redistribute it and/or modify
5
# it under the terms of the GNU Affero General Public License as
6
# published by the Free Software Foundation, either version 3 of the
7
# License, or (at your option) any later version.
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
# GNU Affero General Public License for more details.
14
# You should have received a copy of the GNU Affero General Public License
15
# along with this program. If not, see <http://www.gnu.org/licenses/>.
17
##############################################################################
18
from openerp.osv import fields, orm
20
class qc_question(orm.Model):
22
This model stores proofs which will be part of a test. Proofs are
23
classified between qualitative (such as color) and quantitative
29
'name': fields.char('Name', size=200, required=True, select=True,
31
'ref': fields.char('Code', size=30, select=True),
32
'type': fields.selection([('qualitative', 'Qualitative'),
33
('quantitative', 'Quantitative')],
34
'Type', select=True, required=True),
35
'value_ids': fields.many2many('qc.answer',
36
'qc_answer_rel', 'question_id', 'answer_id',
38
'company_id': fields.many2one('res.company', 'Company'),
42
'company_id': lambda self, cr, uid, c:
43
self.pool.get('res.company')._company_default_get(cr, uid,
44
'qc.question', context=c),