From ec66961de6b7b40fab46d7b2570dd52aa2b90f44 Mon Sep 17 00:00:00 2001 From: Siddharth Bhalgami Date: Fri, 27 Oct 2017 11:34:41 +0530 Subject: [PATCH] [NameSpace] Odoo/OpenERP -> Flectra in *.xml/*.py --- addons/bus/controllers/main.py | 6 +++--- addons/bus/models/bus.py | 2 +- addons/google_spreadsheet/__manifest__.py | 2 +- addons/hw_screen/controllers/main.py | 2 +- addons/l10n_fr/migrations/2.0/post-migrate_tags_on_taxes.py | 4 ++-- .../migrations/9.0.1.1/post-migrate_tags_on_taxes.py | 4 ++-- .../migrations/9.0.1.1/pre-set_tags_and_taxes_updatable.py | 4 ++-- .../migrations/9.0.2.0/post-migrate_tags_on_taxes.py | 4 ++-- addons/sale_margin/__init__.py | 4 ++-- doc/_extensions/github_link.py | 2 +- doc/_extensions/odoo_ext/translator.py | 2 +- flectra/addons/base/module/module.py | 2 +- flectra/addons/test_new_api/tests/test_one2many.py | 2 +- flectra/tools/translate.py | 2 +- 14 files changed, 21 insertions(+), 21 deletions(-) diff --git a/addons/bus/controllers/main.py b/addons/bus/controllers/main.py index 5f8a99b6..a6178677 100644 --- a/addons/bus/controllers/main.py +++ b/addons/bus/controllers/main.py @@ -9,9 +9,9 @@ from flectra.tools import pycompat class BusController(Controller): """ Examples: - openerp.jsonRpc('/longpolling/poll','call',{"channels":["c1"],last:0}).then(function(r){console.log(r)}); - openerp.jsonRpc('/longpolling/send','call',{"channel":"c1","message":"m1"}); - openerp.jsonRpc('/longpolling/send','call',{"channel":"c2","message":"m2"}); + flectra.jsonRpc('/longpolling/poll','call',{"channels":["c1"],last:0}).then(function(r){console.log(r)}); + flectra.jsonRpc('/longpolling/send','call',{"channel":"c1","message":"m1"}); + flectra.jsonRpc('/longpolling/send','call',{"channel":"c2","message":"m2"}); """ @route('/longpolling/send', type="json", auth="public") diff --git a/addons/bus/models/bus.py b/addons/bus/models/bus.py index bb301b41..a0ac1b1f 100644 --- a/addons/bus/models/bus.py +++ b/addons/bus/models/bus.py @@ -121,7 +121,7 @@ class ImDispatch(object): current._Thread__daemonic = True # PY2 current._daemonic = True # PY3 # rename the thread to avoid tests waiting for a longpolling - current.setName("openerp.longpolling.request.%s" % current.ident) + current.setName("flectra.longpolling.request.%s" % current.ident) registry = flectra.registry(dbname) diff --git a/addons/google_spreadsheet/__manifest__.py b/addons/google_spreadsheet/__manifest__.py index 14964fe9..6b0ac6e8 100644 --- a/addons/google_spreadsheet/__manifest__.py +++ b/addons/google_spreadsheet/__manifest__.py @@ -7,7 +7,7 @@ 'version': '1.0', 'category': 'Extra Tools', 'description': """ -The module adds the possibility to display data from Odoo in Google Spreadsheets in real time. +The module adds the possibility to display data from Flectra in Google Spreadsheets in real time. ================================================================================================= """, 'depends': ['google_drive'], diff --git a/addons/hw_screen/controllers/main.py b/addons/hw_screen/controllers/main.py index 85c002fe..ffe82799 100644 --- a/addons/hw_screen/controllers/main.py +++ b/addons/hw_screen/controllers/main.py @@ -4,7 +4,7 @@ from flectra import http from flectra.tools import config from flectra.addons.web.controllers import main as web -from openerp.addons.hw_posbox_homepage.controllers import main as homepage +from flectra.addons.hw_posbox_homepage.controllers import main as homepage import logging import netifaces as ni diff --git a/addons/l10n_fr/migrations/2.0/post-migrate_tags_on_taxes.py b/addons/l10n_fr/migrations/2.0/post-migrate_tags_on_taxes.py index a37770d2..9062980b 100644 --- a/addons/l10n_fr/migrations/2.0/post-migrate_tags_on_taxes.py +++ b/addons/l10n_fr/migrations/2.0/post-migrate_tags_on_taxes.py @@ -1,7 +1,7 @@ -from openerp.modules.registry import RegistryManager +from flectra.modules.registry import RegistryManager def migrate(cr, version): registry = RegistryManager.get(cr.dbname) - from openerp.addons.account.models.chart_template import migrate_tags_on_taxes + from flectra.addons.account.models.chart_template import migrate_tags_on_taxes migrate_tags_on_taxes(cr, registry) diff --git a/addons/l10n_fr/migrations/9.0.1.1/post-migrate_tags_on_taxes.py b/addons/l10n_fr/migrations/9.0.1.1/post-migrate_tags_on_taxes.py index 6f933404..36f15799 100644 --- a/addons/l10n_fr/migrations/9.0.1.1/post-migrate_tags_on_taxes.py +++ b/addons/l10n_fr/migrations/9.0.1.1/post-migrate_tags_on_taxes.py @@ -1,7 +1,7 @@ -from openerp.modules.registry import RegistryManager +from flectra.modules.registry import RegistryManager def migrate(cr, version): registry = RegistryManager.get(cr.dbname) - from openerp.addons.account.models.chart_template import migrate_tags_on_taxes + from flectra.addons.account.models.chart_template import migrate_tags_on_taxes migrate_tags_on_taxes(cr, registry) diff --git a/addons/l10n_fr/migrations/9.0.1.1/pre-set_tags_and_taxes_updatable.py b/addons/l10n_fr/migrations/9.0.1.1/pre-set_tags_and_taxes_updatable.py index 586ae984..f735e4a2 100644 --- a/addons/l10n_fr/migrations/9.0.1.1/pre-set_tags_and_taxes_updatable.py +++ b/addons/l10n_fr/migrations/9.0.1.1/pre-set_tags_and_taxes_updatable.py @@ -1,7 +1,7 @@ -from openerp.modules.registry import RegistryManager +from flectra.modules.registry import RegistryManager def migrate(cr, version): registry = RegistryManager.get(cr.dbname) - from openerp.addons.account.models.chart_template import migrate_set_tags_and_taxes_updatable + from flectra.addons.account.models.chart_template import migrate_set_tags_and_taxes_updatable migrate_set_tags_and_taxes_updatable(cr, registry, 'l10n_fr') diff --git a/addons/l10n_lu/migrations/9.0.2.0/post-migrate_tags_on_taxes.py b/addons/l10n_lu/migrations/9.0.2.0/post-migrate_tags_on_taxes.py index fa56fd00..1f2ccd49 100644 --- a/addons/l10n_lu/migrations/9.0.2.0/post-migrate_tags_on_taxes.py +++ b/addons/l10n_lu/migrations/9.0.2.0/post-migrate_tags_on_taxes.py @@ -1,6 +1,6 @@ -from openerp.modules.registry import RegistryManager +from flectra.modules.registry import RegistryManager def migrate(cr, version): registry = RegistryManager.get(cr.dbname) - from openerp.addons.account.models.chart_template import migrate_tags_on_taxes + from flectra.addons.account.models.chart_template import migrate_tags_on_taxes migrate_tags_on_taxes(cr, registry) diff --git a/addons/sale_margin/__init__.py b/addons/sale_margin/__init__.py index 49a98edb..e153912d 100644 --- a/addons/sale_margin/__init__.py +++ b/addons/sale_margin/__init__.py @@ -2,8 +2,8 @@ # Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details. from functools import partial -import openerp -from openerp import api, SUPERUSER_ID +import flectra +from flectra import api, SUPERUSER_ID from . import models # noqa from . import report # noqa diff --git a/doc/_extensions/github_link.py b/doc/_extensions/github_link.py index 155e4083..0b53e1ed 100644 --- a/doc/_extensions/github_link.py +++ b/doc/_extensions/github_link.py @@ -4,7 +4,7 @@ import os.path from werkzeug import urls -from odoo.tools import pycompat +from flectra.tools import pycompat """ * adds github_link(mode) context variable: provides URL (in relevant mode) of diff --git a/doc/_extensions/odoo_ext/translator.py b/doc/_extensions/odoo_ext/translator.py index da4e8731..c338b62b 100644 --- a/doc/_extensions/odoo_ext/translator.py +++ b/doc/_extensions/odoo_ext/translator.py @@ -13,7 +13,7 @@ from docutils import nodes from sphinx import addnodes, util from sphinx.locale import admonitionlabels -from odoo.tools import pycompat +from flectra.tools import pycompat def _parents(node): diff --git a/flectra/addons/base/module/module.py b/flectra/addons/base/module/module.py index 87f93d9e..88433411 100644 --- a/flectra/addons/base/module/module.py +++ b/flectra/addons/base/module/module.py @@ -749,7 +749,7 @@ class Module(models.Model): raise AccessDenied() try: - _logger.info('Downloading module `%s` from OpenERP Apps', module_name) + _logger.info('Downloading module `%s` from Flectra Apps', module_name) response = requests.get(url) response.raise_for_status() content = response.content diff --git a/flectra/addons/test_new_api/tests/test_one2many.py b/flectra/addons/test_new_api/tests/test_one2many.py index 8531396f..7523dd1d 100644 --- a/flectra/addons/test_new_api/tests/test_one2many.py +++ b/flectra/addons/test_new_api/tests/test_one2many.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from openerp.tests.common import TransactionCase +from flectra.tests.common import TransactionCase class One2manyCase(TransactionCase): diff --git a/flectra/tools/translate.py b/flectra/tools/translate.py index 1b6b3200..49efb4a4 100644 --- a/flectra/tools/translate.py +++ b/flectra/tools/translate.py @@ -26,7 +26,7 @@ from .osutil import walksymlinks _logger = logging.getLogger(__name__) # used to notify web client that these translations should be loaded in the UI -WEB_TRANSLATION_COMMENT = "openerp-web" +WEB_TRANSLATION_COMMENT = "flectra-web" SKIPPED_ELEMENTS = ('script', 'style', 'title')