diff --git a/CHANGELOG b/CHANGELOG index e473f46f89..f6ea93f519 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,4 @@ +* Allow non translatable reports * Replace hard coded 'state' by '_transition_state' in copy * Support dotted notation in copy default * Allow callable in copy default diff --git a/trytond/ir/action.py b/trytond/ir/action.py index 1188b1d64e..77674f4125 100644 --- a/trytond/ir/action.py +++ b/trytond/ir/action.py @@ -402,6 +402,8 @@ class ActionReport(ActionMixin, ModelSQL, ModelView): direct_print = fields.Boolean('Direct Print') single = fields.Boolean("Single", help="Check if the template works only for one record.") + translatable = fields.Boolean("Translatable", + help="Uncheck to disable translations for this report.") template_extension = fields.Selection([ ('odt', 'OpenDocument Text'), ('odp', 'OpenDocument Presentation'), @@ -527,6 +529,10 @@ class ActionReport(ActionMixin, ModelSQL, ModelView): def default_single(cls): return False + @classmethod + def default_translatable(cls): + return True + @staticmethod def default_template_extension(): return 'odt' diff --git a/trytond/ir/translation.py b/trytond/ir/translation.py index be63b6c61a..0ab4536972 100644 --- a/trytond/ir/translation.py +++ b/trytond/ir/translation.py @@ -1008,7 +1008,7 @@ class TranslationSet(Wizard): reports = Report.browse(context.get('active_ids', [])) elif context.get('active_model', 'ir.ui.menu') == 'ir.ui.menu': with Transaction().set_context(active_test=False): - reports = Report.search([]) + reports = Report.search([('translatable', '=', True)]) else: return @@ -1253,6 +1253,7 @@ class TranslationClean(Wizard): with Transaction().set_context(active_test=False): if not Report.search([ ('report_name', '=', translation.name), + ('translatable', '=', True), ]): return True diff --git a/trytond/ir/view/action_report_form.xml b/trytond/ir/view/action_report_form.xml index de9363cc6f..777646ff37 100644 --- a/trytond/ir/view/action_report_form.xml +++ b/trytond/ir/view/action_report_form.xml @@ -4,8 +4,16 @@ this repository contains the full copyright notices and license terms. -->