Skip to content

Commit

Permalink
[FIX] product_print_category: Make print_category_id searchable on pr…
Browse files Browse the repository at this point in the history
…oduct template

By storing print_category_id, we can search on it.

Signed-off-by: Carmen Bianca BAKKER <[email protected]>
  • Loading branch information
carmenbianca committed Dec 12, 2022
1 parent f44b571 commit 4c6e055
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion product_print_category/models/product_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class ProductTemplate(models.Model):
_inherit = ["product.template", "product.print.category.mixin"]

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)
Expand Down

0 comments on commit 4c6e055

Please sign in to comment.