[MIG] base external dbsource

* Migration of base_external_dbsource to odoo 9.0

* Fixing test error

* Moving test from yaml to python

* Fixing pylint error in test class

* Placeholder added to connection string text zone

* improving test coverage
This commit is contained in:
Gervais Naoussi
2016-09-08 09:24:27 -04:00
committed by bilbonet
parent a1389aeefc
commit 3d93a57b56
11 changed files with 253 additions and 147 deletions

View File

@@ -0,0 +1,51 @@
<?xml version="1.0"?>
<odoo>
<!-- DBSource -->
<record model="ir.ui.view" id="view_dbsource_tree">
<field name="name">base.external.dbsource.tree</field>
<field name="model">base.external.dbsource</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="External DB Sources">
<field name="name"/>
<field name="connector"/>
<field name="conn_string"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="view_dbsource_form">
<field name="name">base.external.dbsource.form</field>
<field name="model">base.external.dbsource</field>
<field name="arch" type="xml">
<form string="External DB Source">
<sheet>
<group>
<group>
<field name="name"/>
</group>
<group>
<field name="password" password="True"/>
</group>
</group>
<group col="1">
<field name="connector"/>
<field name="conn_string" placeholder="Please check the tooltip for connection string examples"/>
<button name="connection_test" string="Test Connection" type="object" icon="gtk-network"/>
</group>
</sheet>
</form>
</field>
</record>
<record model="ir.actions.act_window" id="action_dbsource">
<field name="name">External Database Sources</field>
<field name="res_model">base.external.dbsource</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_dbsource_tree"/>
</record>
<menuitem name="Database Sources" id="menu_dbsource" parent="base.next_id_9" action="action_dbsource"/>
</odoo>