From dd3fdff396c31067f82cae601214ed54cad60fa4 Mon Sep 17 00:00:00 2001 From: trisdoan Date: Mon, 14 Oct 2024 10:48:03 +0700 Subject: [PATCH] fixup! [MIG] base_report_to_printer: Migration to 18.0 --- base_report_to_printer/models/printing_action.py | 2 ++ base_report_to_printer/models/printing_report_xml_action.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/base_report_to_printer/models/printing_action.py b/base_report_to_printer/models/printing_action.py index 5c3e79ab0ee..de5c070eacb 100644 --- a/base_report_to_printer/models/printing_action.py +++ b/base_report_to_printer/models/printing_action.py @@ -18,6 +18,8 @@ class PrintingAction(models.Model): _name = "printing.action" _description = "Print Job Action" + _available_action_types = AVAILABLE_ACTION_TYPES + name = fields.Char(required=True) action_type = fields.Selection( selection=AVAILABLE_ACTION_TYPES, string="Type", required=True diff --git a/base_report_to_printer/models/printing_report_xml_action.py b/base_report_to_printer/models/printing_report_xml_action.py index cac2a0b39b7..06d7a965ffe 100644 --- a/base_report_to_printer/models/printing_report_xml_action.py +++ b/base_report_to_printer/models/printing_report_xml_action.py @@ -22,7 +22,7 @@ class PrintingReportXmlAction(models.Model): comodel_name="res.users", string="User", required=True, ondelete="cascade" ) action = fields.Selection( - selection=lambda s: s.env["printing.action"]._available_action_types(), + selection=lambda s: s.env["printing.action"]._available_action_types, required=True, ) printer_id = fields.Many2one(comodel_name="printing.printer", string="Printer")