diff --git a/bin/addons/base/ir/ir_actions.py b/bin/addons/base/ir/ir_actions.py
index 64d048783c4..6d046f57de7 100644
--- a/bin/addons/base/ir/ir_actions.py
+++ b/bin/addons/base/ir/ir_actions.py
@@ -24,6 +24,7 @@ from osv import fields,osv
import tools
import time
from tools.config import config
+from tools.translate import _
import netsvc
import re
diff --git a/bin/addons/base/ir/ir_attachment.py b/bin/addons/base/ir/ir_attachment.py
index dd1934de698..b1a1eef9e4c 100644
--- a/bin/addons/base/ir/ir_attachment.py
+++ b/bin/addons/base/ir/ir_attachment.py
@@ -33,7 +33,8 @@ class ir_attachment(osv.osv):
ids = [ids]
cr.execute('select distinct res_model from ir_attachment where id in ('+','.join(map(str, ids))+')')
for obj in cr.fetchall():
- ima.check(cr, uid, obj[0], mode)
+ if obj[0]:
+ ima.check(cr, uid, obj[0], mode)
def search(self, cr, uid, args, offset=0, limit=None, order=None,
context=None, count=False):
diff --git a/bin/addons/base/ir/ir_model.py b/bin/addons/base/ir/ir_model.py
index 958dd4845db..05fe09d2b87 100644
--- a/bin/addons/base/ir/ir_model.py
+++ b/bin/addons/base/ir/ir_model.py
@@ -28,6 +28,7 @@ from osv.orm import except_orm, browse_record
import time
import tools
from tools import config
+from tools.translate import _
import pooler
def _get_fields_type(self, cr, uid, context=None):
diff --git a/bin/addons/base/module/module.py b/bin/addons/base/module/module.py
index 7867afa7b92..c6042effc4b 100644
--- a/bin/addons/base/module/module.py
+++ b/bin/addons/base/module/module.py
@@ -36,6 +36,7 @@ import pooler
import netsvc
from tools.parse_version import parse_version
+from tools.translate import _
class module_repository(osv.osv):
diff --git a/bin/addons/base/module/module_wizard.xml b/bin/addons/base/module/module_wizard.xml
index a7e3ceba627..0d21f1eecbe 100644
--- a/bin/addons/base/module/module_wizard.xml
+++ b/bin/addons/base/module/module_wizard.xml
@@ -6,23 +6,23 @@
base.module.import
-
+
Update Modules List
module.module.update
-
+
-
+
Load an Official Translation
module.lang.install
-
+
Export a Translation File
wizard.module.lang.export
form
@@ -32,7 +32,7 @@
-
+
@@ -105,6 +105,6 @@
new
-
+
diff --git a/bin/addons/base/module/wizard/wizard_export_lang.py b/bin/addons/base/module/wizard/wizard_export_lang.py
index 2a56cac2fcc..58de337f45e 100644
--- a/bin/addons/base/module/wizard/wizard_export_lang.py
+++ b/bin/addons/base/module/wizard/wizard_export_lang.py
@@ -27,7 +27,7 @@ import cStringIO
import csv
import pooler
from osv import fields,osv
-
+from tools.translate import _
class wizard_export_lang(osv.osv_memory):
@@ -60,8 +60,10 @@ class wizard_export_lang(osv.osv_memory):
elif this.format == 'tgz':
ext = this.lang and '.po' or '.pot'
this.advice = _('Save this document to a .tgz file. This archive containt UTF-8 %s files and may be uploaded to launchpad.') % (ext,)
-
- this.name = "%s.%s" % (this.lang or _('new'), this.format)
+ filename = _('new')
+ if not this.lang and len(mods) == 1:
+ filename = mods[0]
+ this.name = "%s.%s" % (this.lang or filename, this.format)
out=base64.encodestring(buf.getvalue())
buf.close()
return self.write(cr, uid, ids, {'state':'get', 'data':out, 'advice':this.advice, 'name':this.name}, context=context)
diff --git a/bin/addons/base/module/wizard/wizard_module_import.py b/bin/addons/base/module/wizard/wizard_module_import.py
index fbf66d4c222..b8ddcd6269c 100644
--- a/bin/addons/base/module/wizard/wizard_module_import.py
+++ b/bin/addons/base/module/wizard/wizard_module_import.py
@@ -30,6 +30,7 @@ import tools
import zipfile
from StringIO import StringIO
import base64
+from tools.translate import _
finish_form ='''