Changeset 41 for addons/isp/isp.py


Ignore:
Timestamp:
Sep 13, 2011, 9:55:38 AM (13 years ago)
Author:
chronos
Message:
  • Upraveno: Rozšířena funkčnost modulu ISP o GPS body a spoje.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • addons/isp/isp.py

    r35 r41  
    2323from osv import fields, osv
    2424
     25class network_point(osv.osv):
     26    _name = "network.point"
     27    _columns = {
     28        'name': fields.char('Name', size=32, required=True, translate=True),
     29        'latitude': fields.float('Position latitude', digits=(12,6), required=True),
     30        'longitude': fields.float('Position longitude', digits=(12,6), required=True),
     31        'address_id': fields.many2one('res.partner.address', 'Address'),
     32        'description': fields.text('Description', translate=True),
     33    }
     34network_point()
     35
    2536class network_address(osv.osv):
    2637    _name = "network.address"
    2738    _columns = {
    28         'name': fields.char('Name', size=64, required=True, help='Text alias for address'),
     39        'name': fields.char('Name', size=64, required=True, translate=True, help='Text alias for address'),
    2940        'ipv4': fields.char('IPv4', size=15, help='IPv4 address in form nnn.nnn.nnn.nnn'),
    3041        'ipv6': fields.char('IPv6', size=39, help='IPv6 address in form hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh'),
     
    3647    _columns = {
    3748        'name': fields.char('Name', size=32, required=True),
    38         'show_online': fields.boolean('Show online', help='Always show online state on web'),
     49        'running_permanent': fields.boolean('Running permanent', help='Determine if device is not running temporary'),
    3950        'icon_name': fields.char('Icon file name', size=32),
    4051    }
     
    4758        'partner_id': fields.many2one('res.partner', 'Partner', required=True),
    4859        'interface_ids': fields.one2many('network.interface', 'device_id', 'Interfaces'),
    49         'location_partner_id': fields.many2one('res.partner', 'Location', required=True),
    5060        'type_id': fields.many2one('network.device.type', 'Type', required=True),
    51         'pos_latitude': fields.float('Position latitude'),
    52         'pos_longitude': fields.float('Position longitude'),
    5361        'used': fields.boolean('Used'),
     62        'position': fields.many2one('network.point', 'Position'),
    5463        'online': fields.boolean('Online', readonly=True, help='Network reachability state of device'),
    5564        'last_online': fields.datetime('Last online', readonly=True),
     
    6877network_interface_type()
    6978
     79class network_link(osv.osv):
     80    _name = "network.link"
     81    _columns = {
     82        'name': fields.char('Name', size=32, required=True, translate=True),
     83        'type_id': fields.many2one('network.interface.type', 'Type', required=True),
     84        'interface_ids': fields.one2many('network.interface', 'link_id', 'Interfaces'),
     85        'points_ids': fields.many2many('network.point', 'network_link_point_rel', 'link_id', 'point_id', 'Points'),
     86     }
     87network_link()
     88
    7089class network_interface(osv.osv):
    7190    _name = "network.interface"
     
    7998        'online': fields.boolean('Online', readonly=True, help='Network reachability state of device'),
    8099        'last_online': fields.datetime('Last online', readonly=True),
     100        'link_id': fields.many2one('network.link', 'Link'),
    81101    }
    82102network_interface()
     
    111131    _columns = {
    112132        'name': fields.char('Name', size=32, required=True, translate=True),
     133        'months': fields.integer('Month count', required=True),
    113134    }
    114135network_billing_period()
     
    131152    }
    132153network_service()
     154
     155
Note: See TracChangeset for help on using the changeset viewer.