Commits

Anonymous committed 6d45017

Added Network Group to admin user. Adden network.protocol.type model. Changed Login label by User label in network.software.login model. Updated translations.

  • Participants
  • Parent commits 604e10d

Comments (0)

Files changed (5)

         NetworkSoftwareType,
         NetworkSoftware,
         NetworkSoftwareLogin,
+        NetworkProtocolType,
         NetworkProtocol,
         module='network', type_='model')

File locale/ca_ES.po

 msgstr "Id"
 
 msgctxt "field:network.software.login,login:"
-msgid "Login"
-msgstr "Registre"
+msgid "User"
+msgstr "Usuari"
 
 msgctxt "field:network.software.login,note:"
 msgid "Notes"

File locale/es_ES.po

 msgstr "Id"
 
 msgctxt "field:network.software.login,login:"
-msgid "Login"
-msgstr "Registro"
+msgid "User"
+msgstr "Usuario"
 
 msgctxt "field:network.software.login,note:"
 msgid "Notes"
     'NetworkSoftwareType',
     'NetworkSoftware',
     'NetworkSoftwareLogin',
+    'NetworkProtocolType',
     'NetworkProtocol',
 ]
 
     __name__ = 'network.software.login'
     _rec_name = 'login'
 
-    login = fields.Char('Login', required=True)
+    login = fields.Char('User', required=True)
     password = fields.Char('Password', required=True)
     software = fields.Many2One('network.software', 'Software', required=True)
     note = fields.Text('Notes')
         return self.software.hardware.id
 
 
+class NetworkProtocolType(ModelSQL, ModelView):
+    'Network Protocol Type'
+    __name__ = 'network.protocol.type'
+
+    name = fields.Char('Protocol Name', required=True)
+
+    @classmethod
+    def __setup__(cls):
+        super(NetworkProtocolType, cls).__setup__()
+        cls._order.insert(0, ('name', 'ASC'))
+
 class NetworkProtocol(ModelSQL, ModelView):
     'Network Protocol'
     __name__ = 'network.protocol'
 
-    name = fields.Char('Protocol Name', required=True)
+    name = fields.Many2One('network.protocol.type', 'Protocol', required=True)
+    note = fields.Text('Notes')
     port = fields.Integer('Port', required=True)
     software_login = fields.Many2One('network.software.login',
             'Software Login', required=True)
     <record model="res.group" id="group_network">
         <field name="name">Network</field>
     </record>
+    <record model="res.user-res.group" id="user_admin_group_network">
+        <field name="user" ref="res.user_admin"/>
+        <field name="group" ref="group_network"/>
+    </record>
 
     <!-- Icon -->
     <record model="ir.ui.icon" id="network_icon">
         <field name="perm_delete" eval="True"/>
     </record>
 
+    <!-- network.protocol.type -->
+    <record model="ir.ui.view" id="network_protocol_type_view_tree">
+        <field name="model">network.protocol.type</field>
+        <field name="type">tree</field>
+        <field name="arch" type="xml">
+            <![CDATA[
+            <tree string="Protocols">
+                <field name='name'/>
+            </tree>
+            ]]> 
+        </field>
+    </record>
+
+    <record model="ir.ui.view" id="network_protocol_type_view_form">
+        <field name="model">network.protocol.type</field>
+        <field name="type">form</field>
+        <field name="arch" type="xml">
+            <![CDATA[
+            <form string="Protocol" col="6">
+                <label name='name'/>
+                <field name='name'/>
+            </form>
+            ]]> 
+        </field>
+    </record>
+
+    <record model="ir.model.access" id="access_network_protocol_type">
+        <field name="model" search="[('model', '=', 'network.protocol.type')]"/>
+        <field name="perm_read" eval="True"/>
+        <field name="perm_write" eval="False"/>
+        <field name="perm_create" eval="False"/>
+        <field name="perm_delete" eval="False"/>
+    </record>
+
+    <record model="ir.model.access" id="access_network_protocol_admin_type">
+        <field name="model" search="[('model', '=', 'network.protocol.type')]"/>
+        <field name="group" ref="group_network"/>
+        <field name="perm_read" eval="True"/>
+        <field name="perm_write" eval="True"/>
+        <field name="perm_create" eval="True"/>
+        <field name="perm_delete" eval="True"/>
+    </record>
+
+    <record model="network.protocol.type" id="ftp_protocol_type">
+      <field name="name">FTP</field>
+    </record>
+
+    <record model="network.protocol.type" id="http_protocol_type">
+      <field name="name">HTTP</field>
+    </record>
+
+    <record model="network.protocol.type" id="https_protocol_type">
+      <field name="name">HTTPS</field>
+    </record>
+
+    <record model="network.protocol.type" id="net_rpc_protocol_type">
+      <field name="name">NET-RPC</field>
+    </record>
+
+    <record model="network.protocol.type" id="pop_protocol_type">
+      <field name="name">POP</field>
+    </record>
+
+    <record model="network.protocol.type" id="rtps_protocol_type">
+      <field name="name">RTPS</field>
+    </record>
+
+    <record model="network.protocol.type" id="smtp_protocol_type">
+      <field name="name">SMTP</field>
+    </record>
+
+    <record model="network.protocol.type" id="ssh_protocol_type">
+      <field name="name">SSH</field>
+    </record>
+
+    <record model="network.protocol.type" id="ssl_protocol_type">
+      <field name="name">SSL</field>
+    </record>
+
+    <record model="network.protocol.type" id="tls_protocol_type">
+      <field name="name">TLS</field>
+    </record>
+
+    <record model="network.protocol.type" id="xml_rpc_protocol_type">
+      <field name="name">XML-RPC</field>
+    </record>
+
+    <record model="network.protocol.type" id="xml_rpcs_protocol_type">
+      <field name="name">XML-RPCS</field>
+    </record>
+
+    <record model="network.protocol.type" id="json_protocol_type">
+      <field name="name">JSON</field>
+    </record>
+
+
     <!-- network.protocol -->
     <record model="ir.ui.view" id="network_protocol_view_tree">
         <field name="model">network.protocol</field>