~camptocamp/c2c-rd-addons/8.0a

« back to all changes in this revision

Viewing changes to chricar_application/application.py

  • Committer: ferdinand
  • Date: 2011-04-30 20:34:01 UTC
  • Revision ID: office@chricar.at-20110430203401-eqfv4au4tv3faj93
[ADD] initial

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
#!/usr/bin/python
 
3
# -*- encoding: utf-8 -*-
 
4
##############################################
 
5
#
 
6
# ChriCar Beteiligungs- und Beratungs- GmbH
 
7
# Copyright (C) ChriCar Beteiligungs- und Beratungs- GmbH
 
8
# all rights reserved
 
9
# created 2009-03-27 16:34:25+01
 
10
#
 
11
# WARNING: This program as such is intended to be used by professional
 
12
# programmers who take the whole responsability of assessing all potential
 
13
# consequences resulting from its eventual inadequacies and bugs.
 
14
# End users who are looking for a ready-to-use solution with commercial
 
15
# garantees and support are strongly adviced to contract a Free Software
 
16
# Service Company.
 
17
#
 
18
# This program is Free Software; you can redistribute it and/or
 
19
# modify it under the terms of the GNU General Public License
 
20
# as published by the Free Software Foundation; either version 3
 
21
# of the License, or (at your option) any later version.
 
22
#
 
23
# This program is distributed in the hope that it will be useful,
 
24
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
25
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
26
# GNU General Public License for more details.
 
27
#
 
28
# You should have received a copy of the GNU General Public License
 
29
# along with this program; if not, see <http://www.gnu.org/licenses/> or
 
30
# write to the Free Software Foundation, Inc.,
 
31
# 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
32
#
 
33
###############################################
 
34
import time
 
35
from osv import fields,osv
 
36
import pooler
 
37
 
 
38
class chricar_application(osv.osv):
 
39
     _name = "chricar.application"
 
40
 
 
41
     _columns = {
 
42
       'active'             : fields.boolean ('Active', readonly=True),
 
43
       'author'             : fields.char    ('Author', size=128, required=True),
 
44
       'name'               : fields.char    ('Application Name', size=64, required=True),
 
45
       'partner_id'         : fields.many2one('res.partner','Partner', select=True, required=True),
 
46
       'prefix'             : fields.char    ('Prefix', size=16, required=True),
 
47
       'state'              : fields.char    ('State', size=16, readonly=True),
 
48
       'website'            : fields.char    ('Web Site', size=64, required=True),
 
49
}
 
50
     _defaults = {
 
51
 
 
52
       'active'            : lambda *a: True,
 
53
       'author'            : lambda *a: 'ChriCar Beteiligungs- und Beratungs- GmbH',
 
54
       'state'             : lambda *a: 'draft',
 
55
       'website'           : lambda *a: 'http://www.chricar.at/ChriCar',
 
56
}
 
57
     _order = "name"
 
58
chricar_application()
 
59
 
 
60
class res_partner(osv.osv):
 
61
      _inherit = "res.partner"
 
62
      _columns = {
 
63
          'application_ids': fields.one2many('chricar.application','partner_id','Application'),
 
64
      }
 
65
res_partner()
 
66