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 7, 2022
1 parent e4bb846 commit 7c5a1c7
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 @@ -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)

0 comments on commit 7c5a1c7

Please sign in to comment.