1
# -*- encoding: utf-8 -*-
2
##############################################################################
4
# OpenERP, Open Source Management Solution
5
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
7
# This program is free software: you can redistribute it and/or modify
8
# it under the terms of the GNU Affero General Public License as
9
# published by the Free Software Foundation, either version 3 of the
10
# License, or (at your option) any later version.
12
# This program is distributed in the hope that it will be useful,
13
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
# GNU Affero General Public License for more details.
17
# You should have received a copy of the GNU Affero General Public License
18
# along with this program. If not, see <http://www.gnu.org/licenses/>.
20
##############################################################################
22
from osv import fields
25
class dm_document_job_batch(osv.osv): # {{{
26
_name = "dm.document.job.batch"
29
'name': fields.char('Name', required=True, size=64),
30
'document_job_ids': fields.one2many('dm.document.job', 'document_job_batch_id', 'Offer Document Jobs'),
31
'state': fields.selection([('Pending','pending'),('Error','error'),('Done','done')], 'State'),
34
dm_document_job_batch() # }}}
36
class dm_document_job(osv.osv): # {{{
37
_name = "dm.document.job"
40
'name': fields.char('Name', required=True, size=64),
41
'document_job_batch_id': fields.many2one('dm.document.job.batch', 'Job Batch'),
42
'document_ids': fields.one2many('dm.offer.document', 'document_job', 'Offer Documents'),
43
'state': fields.selection([('Pending','pending'),('Error','error'),('Done','done')], 'State'),
46
dm_document_job() # }}}
48
class dm_offer_document(osv.osv): # {{{
49
_inherit = "dm.offer.document"
52
'printer': fields.char('Printer', size=64),
53
'printer_tray': fields.char('Printer Tray', size=64),
54
'document_job': fields.many2one('dm.document.job', 'Document Job'),
55
'document_job_position': fields.integer('Document Job Position'),
56
'verso': fields.boolean('Verso')
60
'verso': lambda *a: False,
63
dm_offer_document() # }}}
65
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
b'\\ No newline at end of file'