Changeset 41 for addons/isp/isp.py
- Timestamp:
- Sep 13, 2011, 9:55:38 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
addons/isp/isp.py
r35 r41 23 23 from osv import fields, osv 24 24 25 class 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 } 34 network_point() 35 25 36 class network_address(osv.osv): 26 37 _name = "network.address" 27 38 _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'), 29 40 'ipv4': fields.char('IPv4', size=15, help='IPv4 address in form nnn.nnn.nnn.nnn'), 30 41 'ipv6': fields.char('IPv6', size=39, help='IPv6 address in form hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh'), … … 36 47 _columns = { 37 48 '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'), 39 50 'icon_name': fields.char('Icon file name', size=32), 40 51 } … … 47 58 'partner_id': fields.many2one('res.partner', 'Partner', required=True), 48 59 'interface_ids': fields.one2many('network.interface', 'device_id', 'Interfaces'), 49 'location_partner_id': fields.many2one('res.partner', 'Location', required=True),50 60 'type_id': fields.many2one('network.device.type', 'Type', required=True), 51 'pos_latitude': fields.float('Position latitude'),52 'pos_longitude': fields.float('Position longitude'),53 61 'used': fields.boolean('Used'), 62 'position': fields.many2one('network.point', 'Position'), 54 63 'online': fields.boolean('Online', readonly=True, help='Network reachability state of device'), 55 64 'last_online': fields.datetime('Last online', readonly=True), … … 68 77 network_interface_type() 69 78 79 class 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 } 87 network_link() 88 70 89 class network_interface(osv.osv): 71 90 _name = "network.interface" … … 79 98 'online': fields.boolean('Online', readonly=True, help='Network reachability state of device'), 80 99 'last_online': fields.datetime('Last online', readonly=True), 100 'link_id': fields.many2one('network.link', 'Link'), 81 101 } 82 102 network_interface() … … 111 131 _columns = { 112 132 'name': fields.char('Name', size=32, required=True, translate=True), 133 'months': fields.integer('Month count', required=True), 113 134 } 114 135 network_billing_period() … … 131 152 } 132 153 network_service() 154 155
Note:
See TracChangeset
for help on using the changeset viewer.