From 90816757ecca17ddd185ae6e0c06fcdb57b1e20f Mon Sep 17 00:00:00 2001 From: sebalix Date: Thu, 6 Aug 2020 12:30:44 +0200 Subject: [PATCH] [MIG] base_report_to_printer: Print attachments wizard --- .../wizards/print_attachment_report.py | 8 +- .../wizards/print_attachment_report.xml | 99 ++++++++++--------- 2 files changed, 55 insertions(+), 52 deletions(-) diff --git a/base_report_to_printer/wizards/print_attachment_report.py b/base_report_to_printer/wizards/print_attachment_report.py index 65914eb..93ad0ce 100644 --- a/base_report_to_printer/wizards/print_attachment_report.py +++ b/base_report_to_printer/wizards/print_attachment_report.py @@ -1,9 +1,8 @@ -# -*- coding: utf-8 -*- # Copyright 2020 Camptocamp SA # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl) import base64 -from openerp import _, models, api, fields +from odoo import _, models, api, fields class PrintAttachment(models.TransientModel): @@ -59,7 +58,10 @@ class PrintAttachmentLine(models.TransientModel): attachment_id = fields.Many2one( 'ir.attachment', required=True, - domain="['|', ('mimetype', '=', 'application/pdf'), ('mimetype', '=', 'application/octet-stream')]" + domain=( + "['|', ('mimetype', '=', 'application/pdf'), " + "('mimetype', '=', 'application/octet-stream')]" + ) ) record_name = fields.Char(related="attachment_id.res_name", readonly=True) copies = fields.Integer(default=1) diff --git a/base_report_to_printer/wizards/print_attachment_report.xml b/base_report_to_printer/wizards/print_attachment_report.xml index cc10e42..1625737 100644 --- a/base_report_to_printer/wizards/print_attachment_report.xml +++ b/base_report_to_printer/wizards/print_attachment_report.xml @@ -1,50 +1,51 @@ - - - - wizard.print.attachment - wizard.print.attachment - -
- - - - - - - - - - -
-
-
-
-
- - wizard.print.attachment.line.form - wizard.print.attachment.line - -
- - - - - -
-
-
- - Print Attachments - ir.actions.act_window - wizard.print.attachment - form - form - new - - -
-
+ + + wizard.print.attachment + wizard.print.attachment + +
+ + + + + + + + + + +
+
+
+
+
+ + wizard.print.attachment.line.form + wizard.print.attachment.line + +
+ + + + + +
+
+
+ + Print Attachments + ir.actions.act_window + wizard.print.attachment + form + form + new + + +