Search 1.9 billion lines of Odoo code on GitHub

mysql_connector

Author: Compassion CH
License: AGPL-3
Branch: 10.0
Repository: CompassionCH/compassion-switzerland
Languages: Python (84, 74.3%), and reStructuredText (29, 25.7%)
Other branches: 11.0, 12.0, 8.0, 9.0, davidwul-patch-1, davidwul-patch-2, devel, eicher31-patch-1, revert-1050-crowdfunding_compassion-creation, translation-platform, and write-and-pray-journey
Other repositories: Alaggaerion/compassion-switzerland, Grazia976/compassion-switzerland, HeerPhilippe/compassion-switzerland, KCristi/compassion-modules, MickSandoz/compassion-modules, MickSandoz/compassion-switzerland, Nooka10/compassion-switzerland, Quillasp/compassion-switzerland, Secheron/compassion-switzerland, SylvainLosey/compassion-switzerland, Theyiot/compassion-switzerland, WithPrice/compassion-switzerland, albertsh/compassion-switzerland, c-meier/compassion-switzerland, cmtCousteau/compassion-switzerland, cokotracy/compassion-switzerland, consultingerp/theme_crowdfunding, davidZIVI/compassion-modules, davidZIVI/compassion-switzerland, davidwul/compassion-modules, davidwul/compassion-switzerland, ecino/compassion-switzerland, eicher31/compassion-switzerland, emgirardin/compassion-modules, emgirardin/compassion-switzerland, jklay/compassion-switzerland, joblo-compassion/compassion-switzerland, jonathantarabbia/compassion-switzerland, josueBulle/compassion-switzerland, maxime-beck/compassion-modules, maxime-beck/compassion-switzerland, nbornand/compassion-switzerland, ndtran/compassion-modules, ndtran/compassion-switzerland, nfluckiger/compassion-switzerland, quentingigon/compassion-switzerland, samuel-fringeli/compassion-switzerland, samybucher/compassion-switzerland, simhayoz/compassion-switzerland, steveferry/compassion-modules, steveferry/compassion-switzerland, suningwz/compassion-switzerland, vidtsin/compassion-switzerland, vwvw/compassion-switzerland, and wvmrtn/compassion-switzerland

<img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.svg"> <a name="openerp-mysql-connector"></a> <h2>OpenERP MySQL Connector</h2> <p>Utility module that enables other modules that depends on it to access a MySQL server that is defined a settings screen.</p> <a name="installation"></a> <h2>Installation</h2> <p>To install this module, you need to install dependencies:</p> <ul class="simple"> <li>requires python-MySQLdb to be installed on the server.</li> </ul> <a name="configuration"></a> <h2>Configuration</h2> <p>To configure this module, you need to add settings in .conf file of Odoo:</p> <ul class="simple"> <li>mysql_host = &lt;mysql host&gt;</li> <li>mysql_db = &lt;mysql database&gt;</li> <li>mysql_user = &lt;mysql user&gt;</li> <li>mysql_pw = &lt;mysql password&gt;</li> </ul> <a name="usage"></a> <h2>Usage</h2> <p>You can use this module directly from code:</p> <ul class="simple"> <li>from mysql_connector.model.mysql_connector import mysql_connector</li> <li>con = mysql_connector()</li> <li>res_query = mysql_connector.select_all(sql, args)</li> <li>mysql_connector.upsert(table, vals)</li> </ul> <p>See file mysql_connector.py for all supported methods. You can as well inherit to expand the functionalities.</p> <a name="credits"></a> <h2 class="with-subtitle">Credits</h2> <h2 class="section-subtitle" id="contributors"><span class="section-subtitle">Contributors</span></h2> <ul class="simple"> <li>Emanuel Cino &lt;<a class="reference external" href="mailto:ecino&#64;compassion.ch">ecino&#64;compassion.ch</a>&gt;</li> </ul>