añade el orden de búsqueda por fecha de creación en el carousel de productos
This commit is contained in:
parent
9736628ac3
commit
1ea92cc281
1 changed files with 2 additions and 1 deletions
|
@ -24,12 +24,13 @@ class ProductCarouselWebsiteSale(WebsiteSale):
|
|||
# Snippet options only allow a maximium of 24 records
|
||||
limit = min(limit, 24)
|
||||
_pricelist_context, pricelist = self._get_pricelist_context()
|
||||
order = 'website_published desc, create_date desc, website_sequence desc'
|
||||
# Used this way to follow Odoo implementation
|
||||
request.context = dict(
|
||||
request.context,
|
||||
pricelist=pricelist.id,
|
||||
partner=request.env.user.partner_id)
|
||||
records = request.env["product.template"].search(domain or [], limit=limit)
|
||||
records = request.env["product.template"].search(domain or [], limit=limit, order=order)
|
||||
|
||||
records_grouped = []
|
||||
record_list = []
|
||||
|
|
Loading…
Add table
Reference in a new issue