Add filename to translation export wizard

issue9216
review279011002
This commit is contained in:
Albert Cervera i Areny committed 2020-04-13 23:49:48 +02:00
1 parent 3378e283fd
commit 2b609b8036
2 files changed
+12 -2

No files matched your search

+7 -1
View File
@@ -1545,7 +1545,10 @@ class TranslationExportResult(ModelView):
"Export translation"
__name__ = 'ir.translation.export.result'
file = fields.Binary('File', readonly=True)
language = fields.Many2One('ir.lang', 'Language', readonly=True)
module = fields.Many2One('ir.module', 'Module', readonly=True)
file = fields.Binary('File', readonly=True, filename='filename')
filename = fields.Char('Filename')
class TranslationExport(Wizard):
@@ -1575,7 +1578,10 @@ class TranslationExport(Wizard):
cast = self.result.__class__.file.cast
self.result.file = False # No need to store it in session
return {
'module': self.start.module.id,
'language': self.start.language.id,
'file': cast(file_) if file_ else None,
'filename': '%s.po' % self.start.language.code,
}
@@ -2,6 +2,10 @@
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<form>
<label name="language"/>
<field name="language"/>
<label name="module"/>
<field name="module"/>
<label name="file"/>
<field name="file"/>
<field name="file" colspan="3"/>
</form>