Changeset 42 for addons


Ignore:
Timestamp:
Sep 13, 2011, 2:10:45 PM (13 years ago)
Author:
chronos
Message:
 
Location:
addons/isp
Files:
5 added
6 edited

Legend:

Unmodified
Added
Removed
  • addons/isp/__init__.py

    r16 r42  
    2121
    2222import isp
     23import res_partner
    2324# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
    2425
  • addons/isp/__openerp__.py

    r41 r42  
    2727    'depends': [ 'base_tools' ],
    2828    'init_xml': [ ],
    29     'update_xml': [ 'isp_view.xml' ],
     29    'update_xml': [ 'isp_view.xml', 'res_partner.xml' ],
    3030    'demo_xml': [ 'isp_demo.xml' ],
    3131    'installable': True,
  • addons/isp/i18n/cs.po

    r41 r42  
    88"Report-Msgid-Bugs-To: support@openerp.com\n"
    99"POT-Creation-Date: 2011-09-13 07:48+0000\n"
    10 "PO-Revision-Date: 2011-09-13 09:54+0100\n"
     10"PO-Revision-Date: 2011-09-13 10:35+0100\n"
    1111"Last-Translator: Chronos <robie@centrum.cz>\n"
    1212"Language-Team: \n"
     
    4949#: model:network.service.type,name:isp.service_internet
    5050msgid "Internet"
    51 msgstr "Rozhraní"
     51msgstr "Internet"
    5252
    5353#. module: isp
     
    168168#: field:network.device.type,running_permanent:0
    169169msgid "Running permanent"
    170 msgstr "B2žící nepřetržitě"
     170msgstr "Běžící nepřetržitě"
    171171
    172172#. module: isp
  • 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()
  • addons/isp/isp_demo.xml

    r41 r42  
    55        <record model="network.device.type" id="device_type_desktop_pc">
    66            <field name="name">Desktop computer</field>
    7             <field name="running_permanent">0</field>
     7            <field name="running_permanent" eval="False"/>
    88        </record>
    99        <record model="network.device.type" id="device_type_notebook">
    1010            <field name="name">Notebook</field>
    11             <field name="running_permanent">0</field>
     11            <field name="running_permanent" eval="False"/>
    1212        </record>
    1313        <record model="network.device.type" id="device_type_ipcam">
    1414            <field name="name">IP camera</field>
    15             <field name="running_permanent">1</field>
     15            <field name="running_permanent" eval="True"/>
    1616        </record>
    1717        <record model="network.device.type" id="device_type_printer">
    1818            <field name="name">Printer</field>
    19             <field name="running_permanent">0</field>
     19            <field name="running_permanent" eval="False"/>
    2020        </record>
    2121        <record model="network.device.type" id="device_type_server">
    2222            <field name="name">Server</field>
    23             <field name="running_permanent">1</field>
     23            <field name="running_permanent" eval="True"/>
    2424        </record>
    2525        <record model="network.device.type" id="device_type_switch">
    2626            <field name="name">Switch</field>
    27             <field name="running_permanent">1</field>
     27            <field name="running_permanent" eval="True"/>
    2828        </record>
    2929        <record model="network.device.type" id="device_type_router">
    3030            <field name="name">Router</field>
    31             <field name="running_permanent">1</field>
     31            <field name="running_permanent" eval="True"/>
    3232        </record>
    3333        <record model="network.device.type" id="device_type_tv">
    3434            <field name="name">Television</field>
    35             <field name="running_permanent">0</field>
     35            <field name="running_permanent" eval="False"/>
    3636        </record>
    3737        <record model="network.device.type" id="device_type_thermometer">
    3838            <field name="name">Thermometer</field>
    39             <field name="running_permanent">1</field>
     39            <field name="running_permanent" eval="True"/>
    4040        </record>
    4141        <record model="network.device.type" id="device_type_voip">
    4242            <field name="name">VoIP device</field>
    43             <field name="running_permanent">1</field>
     43            <field name="running_permanent" eval="True"/>
    4444        </record>
    4545       
     
    4747        <record model="network.interface.type" id="interface_type_ethernet_metalic">
    4848            <field name="name">Metalic ethernet</field>
    49             <field name="full_duplex">1</field>
     49            <field name="full_duplex" eval="True"/>
    5050        </record>
    5151        <record model="network.interface.type" id="interface_type_ethernet_wifi_b">
    5252            <field name="name">Wi-Fi 802.11b 11Mbit</field>
    53             <field name="full_duplex">0</field>
     53            <field name="full_duplex" eval="False"/>
    5454        </record>
    5555        <record model="network.interface.type" id="interface_type_ethernet_wifi_g">
    5656            <field name="name">Wi-Fi 802.11g 54Mbit</field>
    57             <field name="full_duplex">0</field>
     57            <field name="full_duplex" eval="False"/>
    5858        </record>
    5959        <record model="network.interface.type" id="interface_type_ethernet_wifi_a">
    6060            <field name="name">Wi-Fi 802.11a 54Mbit</field>
    61             <field name="full_duplex">0</field>
     61            <field name="full_duplex" eval="False"/>
    6262        </record>
    6363        <record model="network.interface.type" id="interface_type_ethernet_wifi_n_150">
    6464            <field name="name">Wi-Fi 802.11n 150Mbit</field>
    65             <field name="full_duplex">0</field>
     65            <field name="full_duplex" eval="False"/>
    6666        </record>
    6767        <record model="network.interface.type" id="interface_type_ethernet_wifi_n_300">
    6868            <field name="name">Wi-Fi 802.11n 300Mbit</field>
    69             <field name="full_duplex">0</field>
     69            <field name="full_duplex" eval="False"/>
    7070        </record>
    7171        <record model="network.interface.type" id="interface_type_optics">
    7272            <field name="name">Optic ethernet</field>
    73             <field name="full_duplex">1</field>
     73            <field name="full_duplex" eval="True"/>
    7474        </record>
    7575        <record model="network.interface.type" id="interface_type_wireless_10G">
    7676            <field name="name">Wireless 10 GHz</field>
    77             <field name="full_duplex">1</field>
     77            <field name="full_duplex" eval="True"/>
    7878        </record>
    7979        <record model="network.interface.type" id="interface_type_wireless_24G">
    8080            <field name="name">Wireless 24 GHz</field>
    81             <field name="full_duplex">1</field>
     81            <field name="full_duplex" eval="True"/>
    8282        </record>
    8383        <record model="network.interface.type" id="interface_type_wireless_80G">
    8484            <field name="name">Wireless 80 GHz</field>
    85             <field name="full_duplex">1</field>
     85            <field name="full_duplex" eval="True"/>
    8686        </record>
    8787        <record model="network.interface.type" id="interface_type_cdma">
    8888            <field name="name">CDMA 450 MHz</field>
    89             <field name="full_duplex">0</field>
     89            <field name="full_duplex" eval="False"/>
    9090        </record>
    9191        <record model="network.interface.type" id="interface_type_homeplug">
    9292            <field name="name">Homeplug over 230V</field>
    93             <field name="full_duplex">0</field>
     93            <field name="full_duplex" eval="False"/>
    9494        </record>
    9595        <record model="network.interface.type" id="interface_type_adsl">
    9696            <field name="name">ADSL</field>
    97             <field name="full_duplex">0</field>
     97            <field name="full_duplex" eval="False"/>
    9898        </record>
    9999        <record model="network.interface.type" id="interface_type_vdsl">
    100100            <field name="name">VDSL</field>
    101             <field name="full_duplex">0</field>
     101            <field name="full_duplex" eval="False"/>
    102102        </record>
    103103        <record model="network.interface.type" id="interface_type_3g">
    104104            <field name="name">3G (UTMS, HSDPA)</field>
    105             <field name="full_duplex">0</field>
     105            <field name="full_duplex" eval="False"/>
    106106        </record>
    107107        <record model="network.interface.type" id="interface_type_wimax">
    108108            <field name="name">WiMax</field>
    109             <field name="full_duplex">0</field>
     109            <field name="full_duplex" eval="False"/>
    110110        </record>
    111111        <record model="network.interface.type" id="interface_type_lte">
    112112            <field name="name">LTE</field>
    113             <field name="full_duplex">0</field>
     113            <field name="full_duplex" eval="False"/>
    114114        </record>
    115115       
     
    186186
    187187
    188         <record model="network.device" id="device_router">
    189             <field name="name">Router</field>
     188        <record model="network.device" id="device_router_praha">
     189            <field name="name">Router Praha</field>
    190190            <field name="type_id" ref="device_type_router"/>
    191191            <field name="position" ref="point_praha"/>
     192            <field name="partner_id" search="[]" model="res.partner"/>
     193        </record>
     194        <record model="network.device" id="device_router_brno">
     195            <field name="name">Router Brno</field>
     196            <field name="type_id" ref="device_type_router"/>
     197            <field name="position" ref="point_brno"/>
    192198            <field name="partner_id" search="[]" model="res.partner"/>
    193199        </record>
     
    214220            <field name="ipv6">2001:2442:C422::1</field>
    215221        </record>
     222        <record model="network.address" id="address_router4">
     223            <field name="name">router4</field>
     224            <field name="ipv4">10.0.0.2</field>
     225            <field name="ipv6">2001:2442:C422::2</field>
     226        </record>
    216227
    217228
    218229        <record model="network.link" id="interface_link1">
    219230            <field name="name">link1</field>
     231            <field name="point_ids" eval="[(4, ref('point_praha')),
     232                          (4, ref('point_ostrava'))]"/>
    220233        </record>
    221234        <record model="network.link" id="interface_link2">
     
    227240            <field name="name">eth0</field>
    228241            <field name="type_id" ref="interface_type_optics"/>
    229             <field name="device_id" ref="device_router"/>           
     242            <field name="device_id" ref="device_router_praha"/>           
    230243            <field name="mac">00:01:FE:32:56:26</field>
    231244            <field name="local_address_id" ref="address_router1"/>           
     
    235248            <field name="name">eth1</field>
    236249            <field name="type_id" ref="interface_type_wireless_10G"/>
    237             <field name="device_id" ref="device_router"/>           
     250            <field name="device_id" ref="device_router_praha"/>
    238251            <field name="mac">00:01:FE:32:56:27</field>
    239252            <field name="local_address_id" ref="address_router3"/>           
    240253            <field name="link_id" ref="interface_link2"/>                       
     254        </record>
     255        <record model="network.interface" id="interface_eth0">
     256            <field name="name">eth0</field>
     257            <field name="type_id" ref="interface_type_optics"/>
     258            <field name="device_id" ref="device_router_brno"/>           
     259            <field name="mac">00:01:FE:32:54:22</field>
     260            <field name="local_address_id" ref="address_router2"/>           
     261            <field name="link_id" ref="interface_link1"/>                       
    241262        </record>
    242263
     
    246267            <field name="type_id" ref="service_internet"/>
    247268            <field name="price">200</field>
    248             <field name="available">1</field>
     269            <field name="available" eval="True"/>
    249270        </record>
    250271        <record model="network.service" id="service_internet_2M">
     
    252273            <field name="type_id" ref="service_internet"/>
    253274            <field name="price">300</field>
    254             <field name="available">1</field>
     275            <field name="available" eval="True"/>
     276        </record>
     277
     278
     279        <record model="network.domain" id="domain_company">
     280            <field name="name">company.com</field>
     281        </record>
     282
     283
     284        <record model="network.subnet" id="service_subnet_main">
     285            <field name="name">Main subnet</field>
     286            <field name="address">192.168.0.0</field>
     287            <field name="prefix">24</field>
     288            <field name="dhcp_id" ref="address_router3"/>
     289            <field name="dns_ids" eval="[(4, ref('address_router1')),
     290              (4, ref('address_router2'))]"/>
     291            <field name="gateway_id" ref="address_router2"/>
     292            <field name="wins_id" ref="address_router3"/>
     293            <field name="domain_id" ref="domain_company"/>
     294            <field name="partner_id" search="[]" model="res.partner"/>
    255295        </record>
    256296    </data>
  • addons/isp/isp_view.xml

    r41 r42  
    33  <data>
    44   
    5     <menuitem name="ISP" id="menu_isp" sequence="1" />
     5    <menuitem name="ISP" id="menu_isp" sequence="1"
     6      web_icon="images/isp.png" web_icon_hover="images/isp-hover.png"/>
    67    <menuitem name="Network" parent="menu_isp"
    78      id="base.menu_isp_network" sequence="1"/>
     
    5859
    5960    <record model="ir.actions.act_window" id="action_isp_device_type_form">
    60       <field name="res_model">network.device</field>
     61      <field name="res_model">network.device.type</field>
    6162      <field name="domain">[]</field>
    6263    </record>
     
    243244        <tree string="Address">
    244245          <field name="name" select="1" />
     246          <field name="ipv4" select="1" />
    245247          <field name="ipv6" select="1" />
    246248        </tree>
     
    255257        <form string="Address">
    256258          <field name="name" select="1" />
     259          <field name="ipv4" select="1" />
    257260          <field name="ipv6" select="1" />
    258261        </form>
     
    297300          <field name="price_period_id" select="1" />
    298301          <field name="available" select="1" />
     302          <field name="partner_ids" select="1" />
    299303        </form>
    300304      </field>
     
    387391        <tree string="Domain">
    388392          <field name="name" select="1" />
    389           <field name="parent" select="1" />
     393          <field name="parent_id" select="1" />
    390394          <field name="alias" select="1" />
    391395        </tree>
     
    400404        <form string="Domain">
    401405          <field name="name" select="1" />
    402           <field name="parent" select="1" />
     406          <field name="parent_id" select="1" />
    403407          <field name="alias" select="1" />
    404408        </form>
Note: See TracChangeset for help on using the changeset viewer.