Changeset 42 for addons/isp/isp.py


Ignore:
Timestamp:
Sep 13, 2011, 2:10:45 PM (13 years ago)
Author:
chronos
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • addons/isp/isp.py

    r41 r42  
    8181    _columns = {
    8282        'name': fields.char('Name', size=32, required=True, translate=True),
    83         'type_id': fields.many2one('network.interface.type', 'Type', required=True),
     83        'type_id': fields.many2one('network.interface.type', 'Type'),
    8484        'interface_ids': fields.one2many('network.interface', 'link_id', 'Interfaces'),
    8585        'points_ids': fields.many2many('network.point', 'network_link_point_rel', 'link_id', 'point_id', 'Points'),
     
    106106    _columns = {
    107107        'name': fields.char('Name', size=32, required=True),
    108         'parent': fields.many2one('network.domain', 'Parent'),
     108        'parent_id': fields.many2one('network.domain', 'Parent'),
    109109        'alias': fields.char('Alias', size=32),
    110110    }
     
    142142network_service_type()
    143143
     144class network_service_internet(osv.osv):
     145    _name = "network.service.internet"
     146    _columns = {
     147        'name': fields.char('Name', size=32, required=True, translate=True),
     148        'download_min_speed': fields.integer('Download min. speed', required=True),
     149        'download_max_speed': fields.integer('Download max. speed', required=True),
     150        'upload_min_speed': fields.integer('Upload min. speed', required=True),
     151        'upload_max_speed': fields.integer('Upload max. speed', required=True),
     152    }
     153network_service_internet()
     154
     155class network_service_hosting_vps(osv.osv):
     156    _name = "network.service.hosting.vps"
     157    _columns = {
     158        'name': fields.char('Name', size=32, required=True, translate=True),
     159        'memory_capacity': fields.integer('Memory capacity', required=True, help='Total memory capacity of virtual machine in MB'),
     160        'storage_capacity': fields.integer('Storage capacity', required=True, help='Total storage capacity of virtual machine in GB'),
     161    }
     162network_service_hosting_vps()
     163
    144164class network_service(osv.osv):
    145165    _name = "network.service"
     
    150170        'price_period_id': fields.many2one('network.billing.period', 'Price period'),
    151171        'available': fields.boolean('Available', help='Define if service is available for customers'),
     172        'standard': fields.boolean('Standard', help='Define if service is standard offer for customers'),
     173        'partner_ids': fields.many2many('res_partner', 'network_service_partner_rel', 'service_id', 'partner_id',  'Partners'),
    152174    }
    153175network_service()
    154176
    155 
     177class network_service_instance(osv.osv):
     178    _name = "network.service"
     179    _columns = {
     180        'name': fields.char('Name', size=32, required=True, translate=True),
     181        'type_id': fields.many2one('network.service.type', 'Type'),
     182        'price': fields.integer('Price', help='Price per period'),
     183        'price_period_id': fields.many2one('network.billing.period', 'Price period'),
     184        'available': fields.boolean('Available', help='Define if service is available for customers'),
     185        'standard': fields.boolean('Standard', help='Define if service is standard offer for customers'),
     186    }
     187network_service()
Note: See TracChangeset for help on using the changeset viewer.