diff --git a/product_print_category/models/product_template.py b/product_print_category/models/product_template.py index 5f082d7d..f0078baa 100644 --- a/product_print_category/models/product_template.py +++ b/product_print_category/models/product_template.py @@ -9,6 +9,9 @@ class ProductTemplate(models.Model): _name = "product.template" _inherit = ["product.template", "product.print.category.mixin"] + # store this field (required for the related fields below) + product_variant_id = fields.Many2one(store=True) + print_category_id = fields.Many2one( related="product_variant_id.print_category_id", readonly=False )