From 221d2f8e6b509e21a75df2fa43eb26f4ab03fcca Mon Sep 17 00:00:00 2001 From: Jacques-Etienne Baudoux Date: Fri, 6 Dec 2024 12:24:11 +0100 Subject: [PATCH] [FIX] printing_auto_base: bound to model --- printing_auto_base/models/printing_auto.py | 1 + printing_auto_base/tests/common.py | 1 + 2 files changed, 2 insertions(+) diff --git a/printing_auto_base/models/printing_auto.py b/printing_auto_base/models/printing_auto.py index fe1d13ac9c2..5f3ed8bf6dc 100644 --- a/printing_auto_base/models/printing_auto.py +++ b/printing_auto_base/models/printing_auto.py @@ -19,6 +19,7 @@ class PrintingAuto(models.Model): _description = "Printing Auto" name = fields.Char(string="Name", required=True) + model = fields.Char(string="Related Document Model", required=True) data_source = fields.Selection( [ diff --git a/printing_auto_base/tests/common.py b/printing_auto_base/tests/common.py index 1cd0d1110bb..847b7e2ada4 100644 --- a/printing_auto_base/tests/common.py +++ b/printing_auto_base/tests/common.py @@ -50,6 +50,7 @@ def setUpClass(cls): @classmethod def _create_printing_auto(cls, vals): + vals.setdefault("model", "printing.auto") return cls.env["printing.auto"].create(vals) @classmethod