Skip to content

Commit

Permalink
Merge PR #307 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by JordiBForgeFlow
  • Loading branch information
OCA-git-bot committed Oct 6, 2023
2 parents f2d4f41 + 854ba19 commit 8b70200
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class ProductTemplate(models.Model):

description = fields.Html(
compute="_compute_description",
search="_search_description",
inverse="_inverse_description",
)
is_system_multi_lang = fields.Boolean(
Expand Down Expand Up @@ -42,6 +43,9 @@ def _inverse_description(self):
if len(template.product_variant_ids) == 1:
template.product_variant_ids.description = template.description

def _search_description(self, operator, value):
return [("product_variant_ids.description", operator, value)]

def open_product_variant(self):
self.ensure_one()
return {
Expand Down

0 comments on commit 8b70200

Please sign in to comment.