diff --git a/bin/addons/__init__.py b/bin/addons/__init__.py index 0b5c6dc09c5..5476dc198f3 100644 --- a/bin/addons/__init__.py +++ b/bin/addons/__init__.py @@ -30,7 +30,7 @@ import tools import tools.osutil from tools.safe_eval import safe_eval as eval import pooler - +from tools.translate import _ import netsvc @@ -806,7 +806,7 @@ def load_modules(db, force_demo=False, status=None, update_module=False): graph = create_graph(cr, ['base'], force) if not graph: logger.notifyChannel('init', netsvc.LOG_CRITICAL, 'module base cannot be loaded! (hint: verify addons-path)') - raise osv.osv.except_osv('Could not load base module', 'module base cannot be loaded! (hint: verify addons-path)') + raise osv.osv.except_osv(_('Could not load base module'), _('module base cannot be loaded! (hint: verify addons-path)')) has_updates = load_module_graph(cr, graph, status, perform_checks=(not update_module), report=report) if update_module: diff --git a/bin/addons/base/i18n/base.pot b/bin/addons/base/i18n/base.pot index 6d8f5dc45f0..5207ac37788 100644 --- a/bin/addons/base/i18n/base.pot +++ b/bin/addons/base/i18n/base.pot @@ -4392,6 +4392,7 @@ msgstr "" #: code:addons/base/module/module.py:0 #: code:addons/base/res/res_currency.py:0 #: code:addons/base/res/res_user.py:0 +#: code:addons/base/res/ir_property.py:0 #, python-format msgid "Error" msgstr "" @@ -5858,6 +5859,7 @@ msgstr "" #. module: base #: code:addons/base/module/wizard/base_module_import.py:0 +#: code:addons/base/ir/ir_values.py: #, python-format msgid "Error !" msgstr "" @@ -8956,3 +8958,51 @@ msgstr "" msgid "Russian / русский язык" msgstr "" +#. module: base +#: code:addons/base/module/wizard/base_module_upgrade.py:0 +#, python-format +msgid "Unmet dependency !" +msgstr "" + +#. module: base +#: code:addons/base/module/wizard/base_module_upgrade.py:0 +#, python-format +msgid "Following modules are not installed or unknown: %s" +msgstr "" + +#. module: base +#: code:addons/base/ir/ir_model.py:0 +#, python-format +msgid "Invalid search criterions" +msgstr "" + +#. module: base +#: code:addons/base/ir/ir_model.py:0 +#, python-format +msgid "The osv_memory field can only be compared with = and != operator." +msgstr "" + +#. module: base +#: code:addons/base/ir/ir_values.py:0 +#, python-format +msgid "You do not have the permission to perform this operation !!!" +msgstr "" + +#. module: base +#: code:addons/base/res/ir_property.py:0 +#, python-format +msgid "Invalid type" +msgstr "" + +#. module: base +#: code:addons/__init__.py:0 +#, python-format +msgid "Could not load base module" +msgstr "" + +#. module: base +#: code:addons/__init__.py:0 +#, python-format +msgid "module base cannot be loaded! (hint: verify addons-path)" +msgstr "" + diff --git a/bin/addons/base/ir/ir_actions.py b/bin/addons/base/ir/ir_actions.py index 84419d25b51..306ec0c1ef1 100644 --- a/bin/addons/base/ir/ir_actions.py +++ b/bin/addons/base/ir/ir_actions.py @@ -485,7 +485,7 @@ class actions_server(osv.osv): for field in fields: try: obj = getattr(obj, field) - except Exception,e : + except Exception: logger.notifyChannel('Workflow', netsvc.LOG_ERROR, 'Failed to parse : %s' % (field)) return obj @@ -506,7 +506,7 @@ class actions_server(osv.osv): for field in fields: try: obj = getattr(obj, field) - except Exception,e : + except Exception: logger.notifyChannel('Workflow', netsvc.LOG_ERROR, 'Failed to parse : %s' % (field)) return obj @@ -514,7 +514,6 @@ class actions_server(osv.osv): def merge_message(self, cr, uid, keystr, action, context=None): if context is None: context = {} - logger = netsvc.Logger() def merge(match): obj_pool = self.pool.get(action.model_id.model) id = context.get('active_id') diff --git a/bin/addons/base/ir/ir_model.py b/bin/addons/base/ir/ir_model.py index 3f3700b0e45..86bb6cc4dc5 100644 --- a/bin/addons/base/ir/ir_model.py +++ b/bin/addons/base/ir/ir_model.py @@ -57,7 +57,7 @@ class ir_model(osv.osv): return [] field, operator, value = domain[0] if operator not in ['=', '!=']: - raise osv.except_osv('Invalid search criterions','The osv_memory field can only be compared with = and != operator.') + raise osv.except_osv(_('Invalid search criterions'), _('The osv_memory field can only be compared with = and != operator.')) value = bool(value) if operator == '=' else not bool(value) all_model_ids = self.search(cr, uid, [], context=context) is_osv_mem = self._is_osv_memory(cr, uid, all_model_ids, 'osv_memory', arg=None, context=context) diff --git a/bin/addons/base/module/wizard/base_module_upgrade.py b/bin/addons/base/module/wizard/base_module_upgrade.py index 4db4028bdb0..de9df1ec3e0 100644 --- a/bin/addons/base/module/wizard/base_module_upgrade.py +++ b/bin/addons/base/module/wizard/base_module_upgrade.py @@ -93,7 +93,7 @@ class base_module_upgrade(osv.osv_memory): if dep_mod.state in ('unknown','uninstalled'): unmet_packages.append(dep_mod.name) if len(unmet_packages): - raise osv.except_osv('Unmet dependency !', 'Following modules are uninstalled or unknown. \n\n'+'\n'.join(unmet_packages)) + raise osv.except_osv(_('Unmet dependency !'), _('Following modules are not installed or unknown: %s') % ('\n\n' + '\n'.join(unmet_packages))) mod_obj.download(cr, uid, ids, context=context) cr.commit() _, pool = pooler.restart_pool(cr.dbname, update_module=True) diff --git a/bin/addons/base/res/partner/partner.py b/bin/addons/base/res/partner/partner.py index 2c7747b4fd7..8318a7602bf 100644 --- a/bin/addons/base/res/partner/partner.py +++ b/bin/addons/base/res/partner/partner.py @@ -23,7 +23,6 @@ import math from osv import fields,osv import tools -import ir import pooler from tools.translate import _ diff --git a/bin/addons/base/res/res_user.py b/bin/addons/base/res/res_user.py index 6f9cdad2518..543185530e3 100644 --- a/bin/addons/base/res/res_user.py +++ b/bin/addons/base/res/res_user.py @@ -265,7 +265,7 @@ class users(osv.osv): ] _sql_constraints = [ - ('login_key', 'UNIQUE (login)', _('You can not have two users with the same login !')) + ('login_key', 'UNIQUE (login)', 'You can not have two users with the same login !') ] def _get_email_from(self, cr, uid, ids, context=None): diff --git a/bin/report/printscreen/ps_list.py b/bin/report/printscreen/ps_list.py index 7fb20eab0dc..fd1169b199e 100644 --- a/bin/report/printscreen/ps_list.py +++ b/bin/report/printscreen/ps_list.py @@ -139,7 +139,6 @@ class report_printscreen_list(report_int): _append_node('header-date', str(rml_obj.formatLang(time.strftime("%Y-%m-%d"),date=True))+' ' + str(time.strftime("%H:%M"))) l = [] t = 0 - rowcount = 0; strmax = (pageSize[0]-40) * 2.8346 temp = [] tsum = [] diff --git a/bin/report/report_sxw.py b/bin/report/report_sxw.py index 21f37dcf70e..fe34b67dc4c 100644 --- a/bin/report/report_sxw.py +++ b/bin/report/report_sxw.py @@ -204,13 +204,10 @@ class rml_parse(object): return res['datas'] else : return '' - except Exception,e: + except Exception: return '' def setLang(self, lang): - if not lang or self.default_lang.has_key(lang): - if not lang: - key = 'en_US' self.localcontext['lang'] = lang self.lang_dict_called = False for obj in self.objects: @@ -519,7 +516,6 @@ class report_sxw(report_rml, preprocess.report): xml_declaration=True) rml_dom = etree.XML(rml) - body = rml_dom[-1] elements = [] key1 = rml_parser.localcontext['name_space']["text"]+"p" key2 = rml_parser.localcontext['name_space']["text"]+"drop-down"