From 7c5a1c78a49de2b5d1b73448b1455e0af4e9908e Mon Sep 17 00:00:00 2001 From: Carmen Bianca BAKKER Date: Wed, 7 Dec 2022 17:13:37 +0100 Subject: [PATCH] [FIX] product_print_category: Make print_category_id searchable on product template By storing print_category_id, we can search on it. Signed-off-by: Carmen Bianca BAKKER --- product_print_category/models/product_template.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product_print_category/models/product_template.py b/product_print_category/models/product_template.py index 32462f40..8471e7f4 100644 --- a/product_print_category/models/product_template.py +++ b/product_print_category/models/product_template.py @@ -9,7 +9,7 @@ class ProductTemplate(models.Model): _inherit = "product.template" print_category_id = fields.Many2one( - related="product_variant_id.print_category_id", readonly=False + related="product_variant_id.print_category_id", readonly=False, store=True ) to_print = fields.Boolean(related="product_variant_id.to_print", readonly=False)