Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,47 @@
class WebsiteSnippetFilter(models.Model):
_inherit = "website.snippet.filter"

def _get_products_latest_sold(self, website, limit, domain, context):
products = super()._get_products_latest_sold(website, limit, domain, context)
def _get_products_latest_sold(self, website, limit, domain, **kwargs):
products = super()._get_products_latest_sold(website, limit, domain, **kwargs)
if products:
return products.with_context(display_default_code=True)
else:
return products

def _get_products_latest_viewed(self, website, limit, domain, context):
products = super()._get_products_latest_viewed(website, limit, domain, context)
def _get_products_latest_viewed(self, website, limit, domain, **kwargs):
products = super()._get_products_latest_viewed(website, limit, domain, **kwargs)
if products:
return products.with_context(display_default_code=True)
else:
return products

def _get_products_recently_sold_with(self, website, limit, domain, context):
def _get_products_recently_sold_with(
self, website, limit, domain, product_template_id, **kwargs
):
products = super()._get_products_recently_sold_with(
website, limit, domain, context
website, limit, domain, product_template_id, **kwargs
)
if products:
return products.with_context(display_default_code=True)
else:
return products

def _get_products_accessories(self, website, limit, domain, context):
products = super()._get_products_accessories(website, limit, domain, context)
def _get_products_accessories(
self, website, limit, domain, product_template_id, **kwargs
):
products = super()._get_products_accessories(
website, limit, domain, product_template_id, **kwargs
)
if products:
return products.with_context(display_default_code=True)
else:
return products

def _get_products_alternative_products(self, website, limit, domain, context):
def _get_products_alternative_products(
self, website, limit, domain, product_template_id, **kwargs
):
products = super()._get_products_alternative_products(
website, limit, domain, context
website, limit, domain, product_template_id, **kwargs
)
if products:
return products.with_context(display_default_code=True)
Expand Down