~gabrielgamez/openerp-tecvemar/tcv_fixed_assets

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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# -*- encoding: utf-8 -*-
##############################################################################
#    Company: 
#    Author: Gabriel
#    Creation Date: 2014-06-19
#    Version: 1.0
#
#    Description:
#
#
##############################################################################

from datetime import datetime
from osv import fields, osv
from tools.translate import _
import pooler
import decimal_precision as dp
import time
import netsvc

##------------------------------------------------------------------ tcv_fixed_assets_components_details


class tcv_fixed_assets_components_details(osv.osv):

    _name = 'tcv.fixed.assets.components.details'

    _description = ''

    ##-------------------------------------------------------------------------

    ##------------------------------------------------------- _internal methods

    ##--------------------------------------------------------- function fields

    _columns = {
        'components_id': fields.many2one(
            'tcv.fixed.assets.components', 'Component details', required=True, 
            ondelete='cascade'),
        'name': fields.char(
            'Name', size=64, required=False, readonly=False),
        'brand': fields.char(
            'Brand', size=64, required=False, readonly=False),
        'model': fields.char(
            'Model', size=64, required=False, readonly=False),
        'serial': fields.char(
            'Serial', size=64, required=False, readonly=False),
        'partner_id': fields.many2one(
            'res.partner', 'Asigned to', change_default=True, readonly=False, 
            ondelete='restrict'),
        'cost_amount': fields.float(
            'Cost', digits_compute=dp.get_precision('Account')),
        'util_life': fields.integer(
            'Util life (Days)'),
        'specifications': fields.text(
            'Specifications', readonly=False),
        }

    _defaults = {
        }

    _sql_constraints = [
        ]

    ##-------------------------------------------------------------------------

    ##---------------------------------------------------------- public methods

    ##-------------------------------------------------------- buttons (object)

    ##------------------------------------------------------------ on_change...

    ##----------------------------------------------------- create write unlink

    ##---------------------------------------------------------------- Workflow

tcv_fixed_assets_components_details()

# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: