Changeset 16
- Timestamp:
- Jul 15, 2011, 10:15:05 AM (13 years ago)
- Location:
- isp module
- Files:
-
- 5 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
isp module/__init__.py
r14 r16 1 # -*- coding: utf-8 -*-1 # -*- encoding: utf-8 -*- 2 2 ############################################################################## 3 # 3 # 4 4 # OpenERP, Open Source Management Solution 5 # Copyright (C) 2004-20 10Tiny SPRL (<http://tiny.be>).5 # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). 6 6 # 7 7 # This program is free software: you can redistribute it and/or modify … … 16 16 # 17 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/>. 18 # along with this program. If not, see <http://www.gnu.org/licenses/>. 19 19 # 20 20 ############################################################################## 21 21 22 import isp 23 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: 22 24 23 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: -
isp module/__openerp__.py
r14 r16 24 24 'description': """This module is usable for network management for wide range of ISP.""", 25 25 'author': 'Chronos', 26 'depends': [ 26 'website': 'http://wiki.zdechov.net/wiki/OpenERP', 27 'depends': [ 'base_tools' 27 28 ], 28 'init_xml': [], 29 'update_xml': [ 29 'init_xml': [ 30 ], 31 'update_xml': [ 'isp_view.xml', 'isp_demo.xml' 30 32 ], 31 33 'demo_xml': [], -
isp module/isp.py
r14 r16 23 23 from osv import fields, osv 24 24 25 class network_address(osv.osv): 26 _name = "network.address" 27 _columns = { 28 'name': fields.char('IPv4', size=15, required=True, help='IPv4 address in form nnn.nnn.nnn.nnn'), 29 'ipv6': fields.char('IPv6', size=39, help='IPv6 address in form hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh'), 30 } 31 network_address() 32 25 33 class network_device_type(osv.osv): 26 34 _name = "network.device.type" … … 37 45 'name': fields.char('Name', size=32, required=True), 38 46 'partner_id': fields.many2one('res.partner', 'Partner', required=True), 47 'interface_ids': fields.one2many('network.interface', 'device_id', 'Interfaces'), 39 48 'location_partner_id': fields.many2one('res.partner', 'Location', required=True), 49 'type_id': fields.many2one('network.device.type', 'Type', required=True), 40 50 'pos_latitude': fields.float('Position latitude'), 41 'pos_lo gitude': fields.float('Position longitude'),51 'pos_longitude': fields.float('Position longitude'), 42 52 'used': fields.boolean('Used'), 43 53 'online': fields.boolean('Online', readonly=True, help='Network reachability state of device'), 44 54 'last_online': fields.datetime('Last online', readonly=True), 45 ' InboundNATPriority': fields.integer('Inbound NAT priority', help="If multiple device is hidden by same NATed public ip, this gives their priority and thus which device will be used for ingoing traffic"),55 'inbound_nat_priority': fields.integer('Inbound NAT priority', help="If multiple device is hidden by same NATed public ip, this gives their priority and thus which device will be used for ingoing traffic"), 46 56 } 47 57 network_device() … … 61 71 _columns = { 62 72 'name': fields.char('Name', size=32), 63 'type ': fields.many2one('network.device.type', 'Type', required=True),73 'type_id': fields.many2one('network.interface.type', 'Type', required=True), 64 74 'mac': fields.char('MAC', size=17, help='Physical address in form XX:XX:XX:XX:XX:XX'), 65 'local_ipv4': fields.char('Local IPv4', size=15, help='Local IPv4 address in form nnn.nnn.nnn.nnn'), 66 'external_ipv4': fields.char('External IPv4', size=15, help='External IPv4 address in form nnn.nnn.nnn.nnn'), 67 'local_ipv6': fields.char('Local IPv6', size=39, help='Local IPv6 address in form hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh:hhhh'), 68 'device': fields.many2one('network.device', 'Device', required=True), 75 'local_address_id': fields.many2one('network.address', 'Local address', help='Local IPv4 address in form nnn.nnn.nnn.nnn'), 76 'external_address_id': fields.many2one('network.address', 'External address'), 77 'device_id': fields.many2one('network.device', 'Device', required=True), 69 78 'online': fields.boolean('Online', readonly=True, help='Network reachability state of device'), 70 79 'last_online': fields.datetime('Last online', readonly=True), 71 80 } 72 81 network_interface() 82 83 class network_domain(osv.osv): 84 _name = "network.domain" 85 _columns = { 86 'name': fields.char('Name', size=32, required=True), 87 'parent': fields.many2one('network.domain', 'Parent'), 88 'alias': fields.char('Alias', size=32), 89 } 90 network_domain() 91 92 class network_subnet(osv.osv): 93 _name = "network.subnet" 94 _columns = { 95 'name': fields.char('Name', size=32, required=True), 96 'address': fields.char('Address', size=15, required=True), 97 'prefix': fields.integer('Prefix', required=True), 98 'dhcp_id': fields.many2one('network.address', 'DHCP'), 99 'gateway_id': fields.many2one('network.address', 'Default gateway'), 100 'dns_ids': fields.many2many('network.address', 'network_subnet_dns_rel', 'subnet_id', 'address_id', 'DNS servers'), 101 'ntp_ids': fields.many2many('network.address', 'network_subnet_ntp_rel', 'subnet_id', 'address_id', 'NTP servers'), 102 'domain_id': fields.many2one('network.domain', 'Domain'), 103 'wins_id': fields.many2one('network.address', 'WINS server'), 104 'partner_id': fields.many2one('res.partner', 'Partner'), 105 } 106 network_subnet() 107 108 class network_billing_period(osv.osv): 109 _name = "network.billing.period" 110 _columns = { 111 'name': fields.char('Name', size=32, required=True), 112 } 113 network_billing_period() 114 115 class network_service_type(osv.osv): 116 _name = "network.service.type" 117 _columns = { 118 'name': fields.char('Name', size=32, required=True), 119 } 120 network_service_type() 121 122 class network_service(osv.osv): 123 _name = "network.service" 124 _columns = { 125 'name': fields.char('Name', size=32, required=True), 126 'type_id': fields.many2one('network.service.type', 'Type'), 127 'price': fields.integer('Price', help='Price per period'), 128 'price_period_id': fields.many2one('network.billing.period', 'Price period'), 129 'available': fields.boolean('Available', help='Define if service is available for customers'), 130 } 131 network_service()
Note:
See TracChangeset
for help on using the changeset viewer.