From b79f7f8525f7d0e4976e3ee4bc2818a80455c3f1 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Thu, 22 Feb 2024 10:19:25 +0530 Subject: [PATCH] [IMP] product_document: order by name to control on ecommerce appearance Order name rather than ID so that the user has more control on documents published in eCommerce and quote builder. Minor CSS cleanup. closes odoo/odoo#154961 Signed-off-by: Fabien Pinckaers (fp) --- addons/product/models/product_document.py | 2 +- addons/website_sale/views/templates.xml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/product/models/product_document.py b/addons/product/models/product_document.py index 58f9aab0336..6b5cdc503d0 100644 --- a/addons/product/models/product_document.py +++ b/addons/product/models/product_document.py @@ -10,7 +10,7 @@ class ProductDocument(models.Model): _inherits = { 'ir.attachment': 'ir_attachment_id', } - _order = 'id desc' + _order = 'name' ir_attachment_id = fields.Many2one( 'ir.attachment', diff --git a/addons/website_sale/views/templates.xml b/addons/website_sale/views/templates.xml index 4fa73c1951e..7eb8d0b362a 100644 --- a/addons/website_sale/views/templates.xml +++ b/addons/website_sale/views/templates.xml @@ -1136,13 +1136,13 @@ -
- Documents +
+
Documents
-
+