From 4ed487a7f62393e4b8800cedccd75c1ac54e160b Mon Sep 17 00:00:00 2001 From: sonhd Date: Fri, 21 Jan 2022 10:19:14 +0700 Subject: [PATCH] [ADD] access right for wizrard print attachment and fix trans format --- base_report_to_printer/security/security.xml | 17 +++++++++++++++++ .../wizards/print_attachment_report.py | 14 ++++++-------- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/base_report_to_printer/security/security.xml b/base_report_to_printer/security/security.xml index ebda2e8..8f68e12 100644 --- a/base_report_to_printer/security/security.xml +++ b/base_report_to_printer/security/security.xml @@ -125,6 +125,23 @@ Update printer wizard + + + + + + Print Attachment User + + + + + + + + + Print Attachment Line User + + diff --git a/base_report_to_printer/wizards/print_attachment_report.py b/base_report_to_printer/wizards/print_attachment_report.py index f2160b2..8f21825 100644 --- a/base_report_to_printer/wizards/print_attachment_report.py +++ b/base_report_to_printer/wizards/print_attachment_report.py @@ -42,14 +42,12 @@ class PrintAttachment(models.TransientModel): ) if errors: return { - "warning": _( - "Following attachments could not be printed:\n\n%s" - % "\n".join( - [ - _("%s (%s copies)") % (err.record_name, err.copies) - for err in errors - ] - ) + "warning": _("Following attachments could not be printed:\n\n%s") + % "\n".join( + [ + _("%s (%s copies)") % (err.record_name, err.copies) + for err in errors + ] ) }